3

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?

Rob
  • 33
  • 2

1 Answers1

-1

No, ther're some tweaks in FF code for TBB, and you're hitting one of them. The purpose of these tweaks is precisly full prevention of "jailbreaking", i.e. requesting data from the place different from your point-of-execution. such tweaking is called/"referred as" sandboxing

Alexey Vesnin
  • 6,385
  • 3
  • 15
  • 36