Merge pull request #3296 from bugron/fix/improve-bug_btn-search

Improves 'Bug' button search method
This commit is contained in:
Quincy Larson
2015-09-13 23:45:28 -07:00

View File

@ -69,12 +69,14 @@ $(document).ready(function() {
$('#search-issue').unbind('click');
$('#search-issue').on('click', function() {
var queryIssue = window.location.href.toString();
window.open('https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=is:issue is:all '+ queryIssue.substr(queryIssue.lastIndexOf('challenges/') + 11).replace('/', ''), '_blank');
window.open('https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=' +
'is:issue is:all ' + (challenge_Name || challengeName) + ' OR ' +
queryIssue.substr(queryIssue.lastIndexOf('challenges/') + 11)
.replace('/', ''), '_blank');
});
$('#help-ive-found-a-bug-wiki-article').unbind('click');
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
var queryIssue = window.location.href.toString();
window.open("https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug", '_blank');
});