소스 검색

restart-firefox-add-menu still doesnt work

pull/1/head
10sr 12 년 전
부모
커밋
d73d1f07f7
1개의 변경된 파일13개의 추가작업 그리고 5개의 파일을 삭제
  1. +13
    -5
      .keysnail.js

+ 13
- 5
.keysnail.js 파일 보기

@@ -238,13 +238,21 @@ plugins.options["twitter_client.use_jmp"] = true;
//
ext.add("restart-firefox-add-menu", function(){
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var elm = document.createElementNS(XUL_NS, "menuitem");
elm.setAttribute("label", "Restart Firefox");
elm.setAttribute("id", "menu_RestartFirefoxKs")
elm.setAttribute("oncommand", "ext.exec('restart-firefox');");

var cmdelm = document.createElementNS(XUL_NS, "command");
cmdelm.setAttribute("id", "my_cmd_restartFirefoxKs")
cmdelm.setAttribute("oncommand", "ext.exec('restart-firefox');");
var commandset = document.getElementById("mainCommandSet");
// menu.insertBefore(elm, menu.getElementById("menu_FileQuitItem"));
commandset.appendChild(cmdelm);

var menuelm = document.createElementNS(XUL_NS, "menuitem");
menuelm.setAttribute("label", "Restart Firefox");
menuelm.setAttribute("id", "my_menu_restartFirefoxKs")
menuelm.setAttribute("command", "my_cmd_restartFirefoxKs");
var menu = document.getElementById("menu_FilePopup");
// menu.insertBefore(elm, menu.getElementById("menu_FileQuitItem"));
menu.appendChild(elm);
menu.appendChild(menuelm);
}, "add restart firefox menu");

//////////////////////////////////////


불러오는 중...
취소
저장