Skip to content

Commit

Permalink
edited bookmarklet to grab from current domain
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Gonzalez committed Jun 28, 2012
1 parent 951f7fc commit 20080be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/bookmarklet/index.html
Expand Up @@ -43,7 +43,7 @@

// The bookmarklet
var stringifiedData = "{ author: '"+ $('#name').val() + " <" + $('#email').val() + ">', secret: '" + $('#secret').val() + "' }";
var js = "javascript: (function (window) { $.gub = {}; $.gub.data = "+ stringifiedData +"; jsCode = document.createElement('script'); jsCode.setAttribute('src', '/bookmarklet/bookmarklet.js'); document.body.appendChild(jsCode); })(window); ";
var js = "javascript: (function (window) { $.gub = {}; $.gub.data = "+ stringifiedData +"; jsCode = document.createElement('script'); jsCode.setAttribute('src', '" + window.location.protocol + "//" + window.location.host + "/" + "bookmarklet/bookmarklet.js'); document.body.appendChild(jsCode); })(window); ";
var bookmarklet = $('<a>').attr('href', js).append('Upload a File to Github Repo');

// Append the bookmarklet
Expand Down

0 comments on commit 20080be

Please sign in to comment.