This is a web page for testing the kind of access content scripts get to the web pages they run inside. The page includes a page script, which does three things:
var p = document.createElement("p");
p.textContent = "This paragraph was added by a page script.";
p.setAttribute("id", "page-script-para");
document.body.appendChild(p);
window.foo = "This global variable was added by a page script";
window.confirm = function() {
alert("The page script has also redefined 'confirm'");
}
If you now install the content-scripts extension, and reload the page, you'll now see two columns of buttons underneath this text.
Each column contains three buttons:
The exact same code is running in each column. But the left-hand column is running in the page script, while the right-hand button is running in the content script. So you'll see the following: