Skip to content

Instantly share code, notes, and snippets.

@bebraw
Created October 3, 2012 19:52
Show Gist options
  • Select an option

  • Save bebraw/3829418 to your computer and use it in GitHub Desktop.

Select an option

Save bebraw/3829418 to your computer and use it in GitHub Desktop.

Revisions

  1. bebraw revised this gist Oct 4, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Bugira.user.js
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ function main() {
    right: 0
    });

    window.__bugira_config = {"api_key":"xwx8e86cfo58"};
    window.__bugira_config = {"api_key":""};
    (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);})();
    }

  2. bebraw created this gist Oct 3, 2012.
    29 changes: 29 additions & 0 deletions Bugira.user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    // ==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);