|
15楼#
发布于:2014-06-17 00:10
tulip17:Scriptish里的脚本转换到Greasemonkey里,有什么简便的方法吗?回到原帖没找到简便的方法。 后来写了一段复制用户脚本清单的代码。设置 about:config 中的 chrome.enabled 为 true 后,在代码片段速记器中选择环境 “浏览器” 运行。 let { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/AddonManager.jsm");
AddonManager.getAddonsByTypes(['greasemonkey-user-script', 'userscript'], function (items) {
var downURLs = [];
items.forEach(function (item) {
var name, downURL;
if (item._script) { // Greasemonkey
name = item._script.name;
downURL = item._script._downloadURL;
} else { // Scriptish
name = item._name;
downURL = item._downloadURL;
}
downURLs.push(name + '\n' + downURL);
});
Cc['@mozilla.org/widget/clipboardhelper;1'].getService(Ci.nsIClipboardHelper).
copyString(downURLs.join('\n\n'));
}); |
|
|
16楼#
发布于:2014-06-25 19:53
|
|
上一页
下一页