-
-
Save DavertMik/3830295 to your computer and use it in GitHub Desktop.
Bugira user script (expects jQuery to be found)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bugira Script | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.55 | |
// @description injects bugira script | |
// @match http://jswiki.codegyre.com/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
// http://stackoverflow.com/questions/2246901/how-can-i-use-jquery-in-greasemonkey-scripts-in-google-chrome | |
// TODO: style bugira widget better. transparent bg now. doesn't look that good | |
function main() { | |
$('<div />').attr('id', 'bugira_widget').appendTo($('body')).css({ | |
position: 'fixed', | |
bottom: 0, | |
right: 0 | |
}); | |
window.__bugira_config = {"api_key":"xwx8e86cfo58"}; | |
(function() {var w = document.createElement('script'); w.type = 'text/javascript'; w.async = true; w.src = 'http://bugiracdn.appspot.com/bugira-widget.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(w);})(); | |
} | |
// Inject our main script | |
var script = document.createElement('script'); | |
script.type = "text/javascript"; | |
script.textContent = '(' + main.toString() + ')();'; | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment