Posts mit dem Label Bookmarklet werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Bookmarklet werden angezeigt. Alle Posts anzeigen

9. Mai 2008

weblin.lite Bookmarklet

This bookmarklet toggles weblin.lite for the current page. It en-lite-ns the current page by adding a URL prefix. If the page is already en-lite-ned, then it removes the prefix. You can add it to your browser as a bookmark.

Bookmarklet: weblin.lite


For those who are interested, this is the code:

var s = new String(top.document.location);
var p = 'http://lite.weblin.com/';
if (s.substr(0, p.length) == p) {
s = s.substr(p.length);
var b = false;
while (!b && s.length != 0) {
if (s.substr(0,1) == '?') {
b = true;
}
s = s.substr(1);
}
var n = s.search(/&weblin\.lite&/);
if (n != -1) {
s = s.substr(0, n);
}
top.document.location = s;
} else {
top.document.location = p + '?' + s + '&weblin.lite&referer=bookmarklet';
}



_happy_coding()