无法让 xpi 在 TorBrowser 中工作
Can't get xpi to work in TorBrowser
我创建了一个小的 HelloWorld 扩展,并且能够让它在 Firefox 31(TorBrowser 所基于的)中运行。但是我无法让它在 TorBrowser 中工作。知道为什么会这样以及我该如何解决?这是我的 main.js
var contextMenu = require("sdk/context-menu");
var menuItem = contextMenu.Item({
label: "Log Selection",
context: contextMenu.SelectionContext(),
contentScript: 'self.on("click", function () {' +
' var text = window.getSelection().toString();' +
' self.postMessage(text);' +
'});',
onMessage: function (selectionText) {
console.log(selectionText);
}
});
上下文菜单项显示在 FF 而不是 TB。
必须将 "permissions": {"private-browsing": true}
添加到 package.json
https://tor.stackexchange.com/questions/6293/sidebar-for-custom-addon-broken-in-tbb
我创建了一个小的 HelloWorld 扩展,并且能够让它在 Firefox 31(TorBrowser 所基于的)中运行。但是我无法让它在 TorBrowser 中工作。知道为什么会这样以及我该如何解决?这是我的 main.js
var contextMenu = require("sdk/context-menu");
var menuItem = contextMenu.Item({
label: "Log Selection",
context: contextMenu.SelectionContext(),
contentScript: 'self.on("click", function () {' +
' var text = window.getSelection().toString();' +
' self.postMessage(text);' +
'});',
onMessage: function (selectionText) {
console.log(selectionText);
}
});
上下文菜单项显示在 FF 而不是 TB。
必须将 "permissions": {"private-browsing": true}
添加到 package.json
https://tor.stackexchange.com/questions/6293/sidebar-for-custom-addon-broken-in-tbb