If you saw that bookmarklet about the experimental viewer I made and wasn't satisfied, then here's a more "automatic" version, in the form of an user-script.
It REPLACES the link with another link that opens a new tab, instead of a new window AUTOMATICALLY!
Source code (Javascript)
function aFuNcTiOn() {
var url = document.location.href;
if (url.substr(0, 32) === 'http://scratch.mit.edu/projects/') {
var lio = url.substring(0, url.lastIndexOf('/')).lastIndexOf('/');
var part = url.substr(lio);
var linkS = document.getElementsByTagName('a');
var coUnt = 0;
for (coUnt = 1; coUnt <= linkS.length; coUnt++) {
if (linkS[coUnt].innerHTML == "Experimental Viewer") {
linkS[coUnt].onclick = "";
linkS[coUnt].href = "http://scratch.mit.edu/experimental/viewproject" + part;
linkS[coUnt].target = "_blank" + part;
}
}
}
}
aFuNcTiOn();If you already know how to install them on your browser, then download it here.
If not then here are two tutorials (Google Chrome and Firefox):
Google Chrome
Download the file and save somewhere. Then open up Google Chrome and the folder where you saved it and drag the file into Google Chrome. Then it's pretty self-explanatory.
Firefox
Download Greasemonkey here.
Then:
And then:
Go here for final instructions.
---
If you didn't understand this, please reply and I will try to help you
Last edited by Sidharth (2011-08-01 02:53:11)

Offline