Skip to content

Instantly share code, notes, and snippets.

@zuzu
Created May 3, 2010 07:03
Show Gist options
  • Save zuzu/387833 to your computer and use it in GitHub Desktop.
Save zuzu/387833 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name j.mp SidebarOpenStatusbarButton
// @include main
// @include chrome://browser/content/browser.xul
// @version 1.0.0
// @description j.mp(bit.ly)のブックマークレットサイドバーを実行するステータスバーのボタンです。
// ==/UserScript==
// @version 2010/05/03 15:47 制作。
var jmpSidebarOpenStatusbarButton = {
init: function() {
var statusbarpanel = document.createElement("statusbarpanel");
statusbarpanel.setAttribute("id", "jmpSidebarOpenStatusbarpanel");
statusbarpanel.setAttribute("label", "j.mp SidebarOpen");
statusbarpanel.setAttribute("tooltiptext", "j.mp\28bit.ly\29\u306E\u30B5\u30A4\u30C9\u30D0\u30FC\u3092\u8D77\u52D5\u3059\u308B\u3002");
statusbarpanel.setAttribute("class", "statusbarpanel-iconic");
statusbarpanel.setAttribute("src","data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAVVVVAVVVVQ1VVVUxVVVVb1VVValVVVW/VVVVv1VVVb9VVVWpVVVVb1VVVTFVVVUNVVVVAQAAAAAAAAAAAAAAAFVVVQ1VVVVAVVVVjVVVVc9RYmr3PLXw/0Gi0f9BotH/QaLR/zy18P9QZ3OxVVVVQFVVVQ0AAAAAAAAAAFVVVQVVVVUxVVVVjVVVVd5Jgp39PLXw/0+ZvP9Yc3//WHN//1hzf/9Pmbz/PLXw/0eJqdxVVVVAVVVVBgAAAABVVVUVVVVVZVVVVcpKgp39PLz6/0Go2/9Yc3//RKnb/0Oi0f9Eqdv/WHN//0Ki0f88vPr/SIyu0FVVVRcAAAAAVVVVPVVVVZ5SY2vxQbbw/0C9+v9Eqdv/RKnb/0C9+v9Avfr/QL36/0G28P9CsOX/QL36/0C9+v9QbnyHVVVVCVVVVY5VVVXXToO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setAttribute("onclick", "jmpSidebarOpenStatusbarButton.launch()");
document.getElementById("status-bar").appendChild(statusbarpanel);
},
launch: function(){
var e = content.document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('src', 'http://j.mp/bookmarklet/load.js');
content.document.body.appendChild(e);
}
}
jmpSidebarOpenStatusbarButton.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment