Tweak @bugron's improvements to our issue submission process

This commit is contained in:
Quincy Larson
2015-09-07 07:54:29 -07:00
parent e49bcece7d
commit c2468b4946

View File

@ -69,14 +69,14 @@ $(document).ready(function() {
$('#search-issue').unbind('click');
$('#search-issue').on('click', function() {
var queryIssue = window.location.href.toString();
$('#issue-modal').modal('hide');
window.open('https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=is:issue is:all '+ queryIssue.substr(queryIssue.lastIndexOf('challenges/') + 11).replace('/', ''), '_blank');
});
$('#report-issue').unbind('click');
$('#report-issue').on('click', function() {
var textMessage = 'https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge ' + window.location.href + ' has an issue. Please describe how to reproduce it, and include links to screenshots if possible.';
textMessage += ' My User Agent is: <code>' + navigator.userAgent + '</code>.';
var textMessage = 'https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge ' + window.location.href + ' has an issue.';
textMessage += ' User Agent is: <code>' + navigator.userAgent + '</code>.';
textMessage += ' Please describe how to reproduce this issue, and include links to screenshots if possible.%0A%0A';
textMessage = textMessage.replace(';', ','); //GitHub cuts User Agent text because of ';' symbol so I just replace it with ','
$('#issue-modal').modal('hide');
window.open(textMessage, '_blank');