Created
August 28, 2010 08:51
-
-
Save zuzu/554910 to your computer and use it in GitHub Desktop.
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 STrSM(SidebarTitle replace SidebarMenu) | |
// @include main | |
// @include chrome://browser/content/browser.xul | |
// @version 1.0.0 | |
// @create zuzu(http://zuzu-service.net/) | |
// @description サイドバーのタイトル部分を切り替えようメニューにします。 | |
// ==/UserScript== | |
// @version 2010/08/22 制作。 | |
(function(){ | |
var SidebarSwitch = { | |
menu: "", | |
init: function(){ | |
var element = document.getElementById("viewSidebarMenu"); | |
var sidebarTitle = document.getElementById("sidebar-title"); | |
this.menu = element.cloneNode(true); // サイドバー切り替えメニューをコピー。 | |
this.menu.setAttribute("ID","sidebarSwitchMenu"); | |
document.getElementById('mainPopupSet').appendChild(this.menu); | |
sidebarTitle.addEventListener('click', function(){ | |
SidebarSwitch.menu.openPopup(this, 'after_start', 0, 0, false, true); | |
}, false); | |
}, | |
} | |
SidebarSwitch.init(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment