-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patherror.js
More file actions
20 lines (15 loc) · 744 Bytes
/
error.js
File metadata and controls
20 lines (15 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function getURLParameter( name ) {
return decodeURI(
( RegExp( name + '=' + '(.+?)(&|$)' ).exec( location.search ) || [ , "" ] )[ 1 ]
);
}
var message = getURLParameter( "message" );
var url = getURLParameter( "url" );
var lineNumber = getURLParameter( "lineNumber" );
document.getElementById( "message" ).innerHTML = message;
document.getElementById( "url" ).innerHTML = "URL: " + url;
document.getElementById( "lineNumber" ).innerHTML = "Line: " + lineNumber;
var githubLink = document.getElementById( "githubLink" )
var githubBase = "https://github.com/BitcoinMafia/SpareCoinsExt/issues/new?"
var githubIssueLink = githubBase + "title=BUG&body=" + message + "%0A%0A" + url + "%0A%0A" + lineNumber
githubLink.href = githubIssueLink;