I've been trying to develop a Tor Browser extension for my own use, but can't seem to get it to access any tab content.
Just as an example, I start with this code in my primary index.js
file:
var self = require("sdk/self");
var tabs = require("sdk/tabs");
function logURL(tab) {
console.log(tab.url);
tab.attach({
contentScript: "if (document.body) document.body.style.border = '5px solid red';"
});
}
tabs.on("ready", logURL);
tabs.open("");
This will both open a new tab and change the border of any tab that has content in regular Firefox, but will only open a new tab in Tor Browser 5.5.5. No matter what I do, I can't seem to access tab content.
Is there some setting I need to change to enable this behavior in Tor Browser?