userChromeJS icon indicating copy to clipboard operation
userChromeJS copied to clipboard

Y大,请教addmenuplus右键打开文件夹的问题

Open fishlee opened this issue 9 years ago • 2 comments

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; } } }

fishlee avatar Oct 12 '15 10:10 fishlee

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]);
    }
})

ywzhaiqi avatar Oct 14 '15 14:10 ywzhaiqi

问题解决,谢谢Y大

fishlee avatar Oct 15 '15 03:10 fishlee