ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Favorite Bookmarklets

(1/2) > >>

MilesAhead:
I have 2 favorite bookmarklets.

The first is Double Back
It backs up 2 pages unless there's insufficient history, then it backs up 1 if possible:

javascript:N=history.length;if(N==2){history.go(-1)}else{history.go(-2)}

I wrote Double Back to fill in the gap between right clicking the back button to
get a list of pages, and hitting the back button twice.  Either way you're in the
position of hitting the back button 2 or more times to go back only 2 pages.
For some reason every backup button in the world overlooks the "backup
2 pages case." If there aren't 2 pages in the history then it tries to back up
one page so you don't feel like you clicked it for nothing! :)


The second is Mod which attempts to display the last modification date
of the current page:

javascript:alert(document.lastModified)

some sites won't allow this function, producing a blank dialog.
Sometimes the results are obviously flawed(January 1, 1970)

but it works on some sites and works in Google Chrome 5 Beta
(unlike SRWare Iron which showed blank on every page I tried.)

Can come in handy when reading a review that doesn't have a date
on the page, or some such similar scenario.   Better 'n nuthin' :)


J-Mac:
A few of my favorites:

Remove Cookies
This one removes any cookies set by the current site. Useful if you don’t want those particular cookies and also don’t want to dump ALL your cookies.

javascript:(function(){C=document.cookie.split(";%20");for(d="."+location.host;d;d=(""+d).substr(1).match(/\..*$/))for(sl=0;sl<2;++sl)for(p="/"+location.pathname;p;p=p.substring(0,p.lastIndexOf('/')))for(i%20in%20C)if(c=C){document.cookie=c+";%20domain="+d.slice(sl)+";%20path="+p.slice(1)+"/"+";%20expires="+new%20Date((new%20Date).getTime()-1e11).toGMTString()}})()

View Password
This makes visible passwords that normally show as asterisks.

javascript:(function(){var%20s,F,j,f,i;%20s%20=%20"";%20F%20=%20document.forms;%20for(j=0;%20j<F.length;%20++j)%20{%20f%20=%20F[j];%20for%20(i=0;%20i<f.length;%20++i)%20{%20if%20(f.type.toLowerCase()%20==%20"password")%20s%20+=%20f.value%20+%20"\n";%20}%20}%20if%20(s)%20alert("Passwords%20in%20forms%20on%20this%20page:\n\n"%20+%20s);%20else%20alert("There%20are%20no%20passwords%20in%20forms%20on%20this%20page.");})();

I recently removed a bunch of mine that I really hadn't used in a long time.

Thanks!

Jim

nudone:
The first is Double Back
It backs up 2 pages unless there's insufficient history, then it backs up 1 if possible:

javascript:N=history.length;if(N==2){history.go(-1)}else{history.go(-2)}

I wrote Double Back to fill in the gap between right clicking the back button to
get a list of pages, and hitting the back button twice.  Either way you're in the
position of hitting the back button 2 or more times to go back only 2 pages.
For some reason every backup button in the world overlooks the "backup
2 pages case." If there aren't 2 pages in the history then it tries to back up
one page so you don't feel like you clicked it for nothing!
-MilesAhead (May 12, 2010, 08:23 PM)
--- End quote ---

excellent. i've been wanting something to do that for years. thanks. (doesn't seem to work in Maxthon though?)

app103:
Krishean's Google Goo Remover that removes the tracking crap from links in Google search, so you can have clean links for copying:


--- Code: Javascript ---javascript:{function%20detect(el){var%20s=((el.toSource)?el.toSource():el.toString());return(s.indexOf('return%20rwt(')!=-1||s.indexOf('return%20clk(')!=-1);}var%20a=document.getElementsByTagName('a');for(var%20i=0;i<a.length;i++)if(a[i].className=='l'&&a[i].onmousedown&&detect(a[i].onmousedown))a[i].setAttribute('onmousedown','');void(0);};
Snailify It

On my old slow PC, this one is very handy when I hit a page that won't load well on an old slow computer. It takes you to the Google mobile version of the page.


--- Code: Javascript ---javascript:location.href='http://www.google.com/gwt/n?_gwt_pg=0&u='+document.location.href;
Zap Colors

When you hit a funky looking page that is too difficult to read because of the web designers choice of background and/or text colors, this one turns the page into black text on a white background with blue unvisited/purple visited links. (you'll never have to deal with lime green text with yellow links on a red background ever again)


--- Code: Javascript ---javascript:(function(){var%20newSS,%20styles='*%20{%20background:%20white%20!%20important;%20color:%20black%20!important%20}%20:link,%20:link%20*%20{%20color:%20#0000EE%20!important%20}%20:visited,%20:visited%20*%20{%20color:%20#551A8B%20!important%20}';%20if(document.createStyleSheet)%20{%20document.createStyleSheet("javascript:'"+styles+"'");%20}%20else%20{%20newSS=document.createElement('link');%20newSS.rel='stylesheet';%20newSS.href='data:text/css,'+escape(styles);%20document.getElementsByTagName("head")[0].appendChild(newSS);%20}%20})();
Backtype Connect

This one will show you some recent discussions and tweets associated with any page on the internet. (test it out here to see what it does) This is more handy for your own pages, to track references to it on the web. (Google Alerts can only go so far and misses a lot of what this picks up)


--- Code: Javascript ---javascript:location.href='http://www.backtype.com/connect/'+encodeURIComponent(location.href.substring(7).replace(new%20RegExp('/','g'),'%252f').replace(new%20RegExp('&','g'),'%2526'))+'?referrer'
These 2 work well together, for pages that have a lot of thumbnails linked to other pages, where you want to save a list of just the links, so you can hit them all later.

The first creates a page in a popup window, just listing all the links on the page:


--- Code: Javascript ---javascript:WN7z=open('','Z6','width=400,height=200,scrollbars,resizable,menubar');DL5e=document.links;with(WN7z.document){write('<base%20target=_blank>');for(lKi=0;lKi<DL5e.length;lKi++){write(DL5e[lKi].toString().link(DL5e[lKi])+'<br><br>')};void(close())}
This one hides all visited links, so all you see are the ones you haven't hit yet:


--- Code: Javascript ---javascript:(function(){var%20newSS,%20styles=':visited%20{display:%20none}';%20if(document.createStyleSheet)%20{%20document.createStyleSheet(%22javascript:'%22+styles+%22'%22);%20}%20else%20{%20newSS=document.createElement('link');%20newSS.rel='stylesheet';%20newSS.href='data:text/css,'+escape(styles);%20document.getElementsByTagName(%22head%22)[0].appendChild(newSS);%20}%20})();

MilesAhead:
Zap Colors is excellent!! Fixes those unreadable pages right up!! I tried a bunch of style sheets and this works much better!!

Navigation

[0] Message Index

[#] Next page

Go to full version