Merge pull request #4851 from bugron/fix/gist-sharing

Fix gist sharing and some other issues
This commit is contained in:
Logan Tegman
2015-12-01 09:21:11 -08:00

View File

@ -175,7 +175,7 @@ window.common = (function(global) {
}); });
$('#search-issue').on('click', function() { $('#search-issue').on('click', function() {
var queryIssue = window.location.href.toString(); var queryIssue = window.location.href.toString().split('?')[0];
window.open( window.open(
'https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=' + 'https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=' +
'is:issue is:all ' + 'is:issue is:all ' +
@ -233,7 +233,7 @@ window.common = (function(global) {
public: true, public: true,
files: {} files: {}
}; };
var queryIssue = window.location.href.toString().split('#?')[0]; var queryIssue = window.location.href.toString().split('?')[0];
var filename = queryIssue var filename = queryIssue
.substr(queryIssue.lastIndexOf('challenges/') + 11) .substr(queryIssue.lastIndexOf('challenges/') + 11)
.replace('/', '') + '.js'; .replace('/', '') + '.js';
@ -248,7 +248,7 @@ window.common = (function(global) {
'\n' + '\n' +
'// Learn to Code at Free Code Camp (www.freecodecamp.com)' + '// Learn to Code at Free Code Camp (www.freecodecamp.com)' +
'\n\n' + '\n\n' +
window.editor.getValue().trim() common.editor.getValue().trim()
}; };
request.send(JSON.stringify(data)); request.send(JSON.stringify(data));