Skip to content

Commit

Permalink
UPdate
Browse files Browse the repository at this point in the history
  • Loading branch information
FeiRuo committed Feb 25, 2015
1 parent f611e6d commit 9e9f465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions anoBtn/_anoBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ var anobtnset = {
};

/**********************************************************************************
*child:[ ]内为当前菜单的下一级菜单配置,支持多级
*child:[ ]内为当前菜单的下级菜单配置,支持多级
*text 为运行参数,如果无需参数,直接删除text属性
*exec 为打开路径,可以是任意文件和文件夹,支持相对路径,相对于配置文件夹;
*相对路径【文件夹】直接“\\”开头
*oncommand 可以用function(){};
*小书签可以用oncommand:function(){
gBrowser.loadURI("javascript:内容")
Expand Down
8 changes: 3 additions & 5 deletions anoBtn/anoBtn.uc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
onclick: "if (event.button == 2) { event.preventDefault(); closeMenus(event.currentTarget);anobtn.edit(anobtn.file); }",
}), ins);
this.reload();
this.reload();//再次重载以解决某些不能的问题
},

reload: function(isAlert) {
Expand Down Expand Up @@ -112,10 +113,8 @@
unint: function(real) {
for (var i = 0; i < this.anomenu.length; i++) {
var obj = this.anomenu[i];
try {
if (!obj.clone)
$("main-menubar").insertBefore($(obj.id), $("main-menubar").childNodes[7]);
} catch (e) {}
if (obj.id && !obj.clone)
$("main-menubar").insertBefore($(obj.id), $("main-menubar").childNodes[7]);
}
$("anobtn").removeChild($("anobtn_popup"));
$("anobtn").parentNode.removeChild($("anobtn"));
Expand Down Expand Up @@ -154,7 +153,6 @@
var popup = document.createElement("menupopup");
popup.setAttribute("id", "anobtn_popup");
popup.setAttribute('position', this.anobtnset.position);
var obj, menuitem;

this.anomenu.forEach(function(obj) {
popup.appendChild(this.newMenuitem(obj));
Expand Down

0 comments on commit 9e9f465

Please sign in to comment.