userChromeJS
userChromeJS copied to clipboard
Y大,请教addmenuplus右键打开文件夹的问题
Y大,_addmenu.js中page栏添加如下代码不起作用,而单独写成三个就可以,麻烦帮忙看看怎么改,多谢多谢 { label: "Files", tooltiptext: "左键:Profiles\n中键:Chrome\n右键:Images", onclick : function(e) { switch(e.button) { case 0: exec : ""; closeMenus(this); break; case 1: exec : "\Chrome"; closeMenus(this); break; case 2: exec : "\extensions\[email protected]\content"; closeMenus(this); break; } } }
page({
label: "Files",
tooltiptext: "左键:Profiles\n中键:Chrome\n右键:Images",
onclick: function(e) {
var path;
switch (e.button) {
case 0:
path = addMenu.handleRelativePath("\\");
break;
case 1:
path = addMenu.handleRelativePath("\\Chrome");
break;
case 2:
path = addMenu.handleRelativePath("\\extensions\\[email protected]\\content");
break;
}
addMenu.exec('C:\\Windows\\explorer.exe', [path]);
}
})
问题解决,谢谢Y大