Skip to content

Commit

Permalink
Add menu item for reporting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
brookhong committed Jan 6, 2018
1 parent 08ea590 commit ec9f4ea
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Thank you for willing to contribute on this project.

## Reporting issues

Please use below template to report issue, or you could click menu item from SurfingKeys icon in browser's tool bar.

## Error details



SurfingKeys: 0.9.22

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0

URL: <The_URL_Where_You_Find_The_Issue>

## Context

**Please replace this with a description of how you were using SurfingKeys.**

## Build

npm install
npm run build

npm run build firefox # build webextension for firefox

npm run dev # build development version
npm run dev firefox # build development version for firefox
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Surfingkeys works for Firefox(above 57) since 0.9.15, with below features as exc
* [Mermaid diagram generator](#mermaid-diagram-generator)
* [PDF viewer](#pdf-viewer)
* [Edit your own settings](#edit-your-own-settings)
* [Build](#build)
* [License](#license)

## Feature list
Expand Down Expand Up @@ -657,13 +656,6 @@ For example,
}
}`;

## Build

npm install
npm run build

npm run build firefox # build webextension for firefox

## API Documentation

> The API documentation is currently a work in progress.
Expand Down
1 change: 1 addition & 0 deletions pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<a href="/pages/options.html" target="_blank">Settings</a>
<a href="/pages/start.html" target="_blank">Help</a>
<a href="/pages/markdown.html?r=/pages/changelog.md" target="_blank">Changelog</a>
<a id="reportIssue" href="#">Report issue</a>
<hr/>
<a href="/pages/pdf_viewer.html" target="_blank">PDF Viewer</a>
<a href="/pages/markdown.html" target="_blank">Markdown preview</a>
Expand Down
6 changes: 6 additions & 0 deletions pages/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ disableAll.addEventListener('click', function() {
updateStatus(response.blacklist);
});
});

document.getElementById('reportIssue').addEventListener('click', function () {
window.close();
var description = "%23%23+Error+details%0A%0A{0}%0A%0ASurfingKeys%3A+{1}%0A%0ABrowser%3A+{2}%0A%0AURL%3A+{3}%0A%0A%23%23+Context%0A%0A%2A%2APlease+replace+this+with+a+description+of+how+you+were+using+SurfingKeys.%2A%2A".format(encodeURIComponent(""), chrome.runtime.getManifest().version, encodeURIComponent(navigator.userAgent), encodeURIComponent("<The_URL_Where_You_Find_The_Issue>"));
window.open("https://github.com/brookhong/Surfingkeys/issues/new?title={0}&body={1}".format(encodeURIComponent(""), description));
});

0 comments on commit ec9f4ea

Please sign in to comment.