Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

locked by Barry Nov 13 '11 at 11:17

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as not a real question by phwd Jan 18 '11 at 6:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Added my suggestions as separate answers so people can vote on individual bookmarklets. –  Tom Savage Jun 30 '10 at 22:26
7  
You should really link each one of them to a the place that provides them. –  Adam Tuttle Jul 1 '10 at 0:52
1  
one could also argue that bookmarklets are for browsers and thus this question belongs to superuser :) –  akira Jul 1 '10 at 17:36

44 Answers 44

While Opera has an option to automatically reload a web page at pre-defined intervals, Internet Explorer, Firefox & Safari do not have any such feature by default.

Here's my version of a bookmarklet to automatically refresh any web-page after a specified interval. This is useful for tracking web-pages that serve info dynamically but may not have implemented AJAX to auto-refresh.

share

I use StackPrinter bookmarklet; it allows to print Stack Exchange questions (like this one) in a printer-friendly way.

javascript:(function(){var re = new RegExp('^http://(.*?)\.com/questions/([0-9]+)/');var group = re.exec(window.location.href);if (group!=null){var service = group[1];var questionid=group[2];window.open('http://www.stackprinter.com/export?format=HTML&service='+service+'&question='+questionid)}else{alert('Attention: question id not found!')}})()
share

A simple one : "View Cookies"

javascript:alert('Cookies%20stored%20by%20this%20host%20or%20domain:\n\n'%20+%20document.cookie.replace(/;%20/g,'\n'));
share

I use view source on Internet Explorer It lets me see the real dom (including all javascript manipulations) of the current page

javascript:(function(){c=unescape(document.documentElement.innerHTML);c=c.replace(/&/g,'&');c=c.replace(/</g,'<');c=c.replace(/>/g,'>');c=c.replace(/</g,'&lt;');c=c.replace(/>/g,'&gt;');document.write('<html><head><title>Source%20of%20Page<\/title><\/head><body><pre>'+c+'<\/pre><\/body><\/html>');x.document.close();})();
share

WTF - to determine what JavaScript libraries are in use on the current page.

share

I use Diigo and the diigolet on safari, they have a toolbar for some browsers though.

Trust me, give it a try.

share

Visual Event to show all attached event handlers

share

Remember password to remove autocomplete="off"

share

jQuerify is the bookmarklet I can not live without. Adds (if necessary) jQuery to the list of scripts on the page. Makes writing other little bookmarklets much less painful!

share

Quix: http://quixapp.com

This is a little bit like Quicksilver for the web. It's very useful for web development. You can also configure Chrome to use it as a search engine to turn the address bar into a command line.

share
javascript:void(eval("window.document.onmouseup=null;window.document.onmousedown=null;window.document.onmouseover=null;window.document.onmouseout=null;window.document.oncontextmenu=null;"))

It prevents the page from capturing mouse events in JavaScript, useful for sites that won't let you right-click or select text. I am not sure where it's originally from, though.

share

Here's my own bookmarklet for all Stack Exchange sites:

This code will show your upvote count for all tags that appear in your user page's top tags section. It should work on any Stack Exchange site you are logged in on (but I've only tested it on Stack Overflow and Meta Stack Overflow). Unfortunately there is a bug in the tag synonym redirection logic that will keep this script from working with tag synonyms.

javascript:var uP=$('#hlinks-user a:eq(1)')[0].href;var uN=uP.replace(/.*\//gi,'');var uI=uP.replace(/.*\/([\d]+)\/.*/,'$1');var tsp='/tags/$0/topusers';var tqp='/questions/tagged/$0';var rD='result';var mA=5;var cA=0;var cO=0;var tT;var aT=[];var rT=[];var lI=function(tA,tP,tX,tT,bK){return' <span style="font-size:smaller;">[<a style="color:#777" href="'+tP.replace('$0',tA)+'"'+(bK?' target="_BLANK"':'')+(tT?' title="'+tT+'"':'')+'>'+tX+'</a>]</span>';};var pR=function(){if($('#'+rD).size()==0){$(document.body).append($('<div id="'+rD+'"></div>').css({'position':'fixed','top':'0','bottom':'0','left':'0','width':'40ex','background':'#fff','border-right':'solid #777 5px','overflow':'auto','text-align':'left','padding':'.3em'}));}};var dR=function(){rT.sort(function(a,b){return b[1]-a[1];});$('#'+rD+' h3').html('Your top '+tT+' tag scores:');$.each(rT,function(index,item){var tA=item[0],sC=item[1];var select=$('#tA'+(index+1));select.find('td:eq(1)').html(tA+lI(tA,tqp,'q','questions')+lI(tA,tsp,'s','stats'));select.find('td:eq(2)').html(sC);if(sC>99){select.find('td:eq(2)').css({'background':(sC>999?'gold':sC>399?'silver':'#A67D3D')});} select.find('td:eq(0)').remove();select.find('td').css({'padding':'.3em'});});};var dP=function(){if(aT.length==0&&cA==0){dR();return;}else if(cA<mA&&aT.length>0){rS(aT.pop());} window.setTimeout(dP,200);};var rS=function(tA){cA++;var oS=++cO;var dI='tA'+oS;$('#'+rD+' table').append($('<tr id="'+dI+'"><td>'+oS+' / '+tT+'</td><td>'+tA+'</td><td>...</td></tr>'));jQuery.get(tsp.replace('$0',tA),function(data){var sT=$(data.replace(/<img[^>]*>/gi,'')).find(".fl:eq(1) a[href*='"+uI+"']").parents('tr:eq(0)').find('.top-count:eq(0)').contents().text().trim().replace(/\D+/,'');rT.push([tA,sT?parseInt(sT):0]);$('#'+dI+' td:last').html('Done.');cA--;});};var tU=function(){jQuery.get(uP,function(result){fT($(result.replace(/<img[^>]*>/gi,'')));})};var fT=function(pN){if(!pN)pN=$('html');pN.find('.user-stats-table:eq(3) a.post-tag').each(function(index,item){aT.push(item.innerHTML.replace(/<[^>]*>/gi,''));});tT=aT.length;$('#'+rD).html('<h3>Retrieving tag scores...</h3><table style="width: 100%;"></table>');dP();};pR();if(document.URL==uP) fT(false);else tU();void(0)

And here is a readable non-bookmarklet version of the script:

// begin config
var uP = $('#hlinks-user a:eq(1)')[0].href; // user page URL
var uN = uP.replace ( /.*\//gi, '' ); // user name
var uI = uP.replace(/.*\/([\d]+)\/.*/, '$1'); // user id
var tsp = '/tags/$0/topusers'; // template for stats page
var tqp = '/questions/tagged/$0'; // template for questions page
var rD = 'result'; // dom id for generated div
var mA = 5; // max concurrent ajax requests
// end config

var cA = 0;  // current ajax requests
var cO = 0;  // current tag offset
var tT;      // total number of tags
var aT = []; // all remaining tags
var rT = []; // retrieved tags (format: [[tag,score]]
var lI = function(tA,tP,tX,tT,bK){ // build link using a tag, a template and a text
    bK = bK!==false;
    return ' <span style="font-size:smaller;">[<a style="color:#777" href="'
           + tP.replace('$0', tA) + '"'
           + (bK ? ' target="_BLANK"' : '')
           + (tT ? ' title="' + tT + '"' : '')
           + '>' + tX + '</a>]</span>';
};
var pR = function(){ // prepare result div
    if($('#'+rD).size()==0){
        $(document.body).append(
            $('<div id="' + rD + '"></div>')
                .css({
                    'position':'fixed',
                    'top':'0',
                    'bottom':'0',
                    'left':'0',
                    'width':'40ex',
                    'background':'#fff',
                    'border-right':'solid #777 5px',
                    'overflow':'auto',
                    'text-align':'left',
                    'padding':'.3em'
                })
        );
    }
};
var dR = function(){ // display results
    rT.sort(function(a,b){
        return b[1]-a[1];
    });
    $('#'+rD+ ' h3').html('Your top '+tT + ' tag scores:');
    $.each(
            rT,
            function(index, item) {
                var tA = item[0], sC = item[1];
                var select = $('#tA'+(index+1));
                select.find('td:eq(1)').html(tA + lI(tA,tqp,'q','questions') + lI(tA,tsp,'s','stats'));
                select.find('td:eq(2)').html(sC);
                if(sC > 99){
                    select.find('td:eq(2)').css({
                        'background' : (
                            sC > 999 ? 'gold'   :
                               sC > 399 ? 'silver' :
                               '#A67D3D'
                        )
                    });
                }
                select.find('td:eq(0)').remove();
                select.find('td').css({'padding':'.3em'});
            }
        );

};
var dP = function(){ // dispatcher function
    if(aT.length == 0 && cA == 0){
        dR();
        return;
    }else if(cA < mA && aT.length > 0){
        rS(aT.pop());
    }
    window.setTimeout(dP, 200);
};
var rS = function(tA){ // retrieve tag score
    cA++;
    var oS = ++cO; // current offset
    var dI = 'tA' + oS; // corresponding dom ID
    $('#'+rD + ' table').append($(
        '<tr id="' + dI + '"><td>'+oS+' / ' + tT + '</td><td>'
        + tA + '</td><td>...</td></tr>'
    ));
    jQuery.get(tsp.replace('$0', tA),function(data){
        // score as text:
        var sT = $(data.replace( /<img[^>]*>/gi, ''))
        .find(".fl:eq(1) a[href*='" + uI + "']")
        .parents('tr:eq(0)').find('.top-count:eq(0)')
        .contents().text().trim().replace(/\D+/,'');

        rT.push(
            [tA,sT ? parseInt(sT) : 0]
        );
        $('#' + dI + ' td:last').html('Done.');
        cA--;
    });
};
var tU = function(){ // get user page via ajax
    jQuery.get(uP, function(result){
        fT($(result.replace( /<img[^>]*>/gi, '')));
    })
};
var fT = function(pN){ // find tags in page node
    if(!pN)pN = $('html');
    pN.find('.user-stats-table:eq(3) a.post-tag').each(
        function(index,item){
            aT.push(item.innerHTML.replace(/<[^>]*>/gi, ''));
        }
    );
    tT=aT.length;
    $('#'+rD).html('<h3>Retrieving tag scores...</h3>'
        + '<table style="width: 100%;"></table>');
    dP();
};
pR();
if(document.URL==uP)// we're in user page
    fT(false);
else // load user page per AJAX
    tU();
share

Kippt for saving URLs I also want to access from my mobile devices.

Readability for making article more readable for my eyes.

share

Kick Ass

http://erkie.github.com

I found this on GitHub. It's fun and likes to get my mind off things and also get rid of them!

share
2  
This has got to be the best bookmarklet of all times!!! –  Sean Patrick Floyd Oct 28 '10 at 15:20
2  
that is a great one... though the question said "Useful" :) –  Ben Nov 3 '10 at 5:20

Aardvark, which is both a Firefox extension and a bookmarklet (for Chrome, Safari and Internet Explorer). It is useful for web developers as well as people who just want to clean up a page prior to printing it. http://karmatics.com/aardvark/

share

Anyone who likes bookmarklets should have a look at the iMacros Firefox and chrome extensions. They let you create "macros" (kind of like huuge bookmarklets) to autoamte task. We use them for all kinds of "stuff" in the office.

Creating iMacros "Bookmarklets" in Firefox: Creating iMacros "Bookmarklets"

share

I use this one, from the W3C validator, very handy for web developers:

javascript:window.open('http://validator.w3.org/check?uri='+escape(window.location));void%200
share

I use this from time to time:

javascript:b=document.body;b.contentEditable=b.contentEditable=='true'?'false':'true';void(0);  
share
1  
Probably worth mentioning what it does, and why it's useful? –  GAThrawn Oct 14 '10 at 15:08

PrintLiminator - Similar to other printing bookmarklets, but lets you select elements to remove from the page.

share

PageZipper loads multi-page articles onto one page.

share

I have my own collection of such utilities those can be found here...

http://saraswaticlasses.net/sites/links4.php

share

Eventually Zap Colors gets installed on any browser I use. Gray text on a black background? Zap and it's suddenly readable.

share

I use a couple of bookmarklets (named + and -) to quickly increment or decrement the page of an article I'm reading.

Decrement:

javascript:(function()%7B%20var%20e,s;%20IB=-1;%20function%20isDigit(c)%20%7B%20return%20(%220%22%20%3C=%20c%20&&%20c%20%3C=%20%229%22)%20%7D%20L%20=%20location.href;%20LL%20=%20L.length;%20for%20(e=LL-1;%20e%3E=0;%20--e)%20if%20(isDigit(L.charAt(e)))%20%7B%20for(s=e-1;%20s%3E=0;%20--s)%20if%20(!isDigit(L.charAt(s)))%20break;%20break;%20%7D%20++s;%20if%20(e%3C0)%20return;%20oldNum%20=%20L.substring(s,e+1);%20newNum%20=%20%22%22%20+%20(parseInt(oldNum,10)%20+%20IB);%20while%20(newNum.length%20%3C%20oldNum.length)%20newNum%20=%20%220%22%20+%20newNum;%20location.href%20=%20L.substring(0,s)%20+%20newNum%20+%20L.slice(e+1);%20%7D)();

Increment:

javascript:(function()%7B%20var%20e,s;%20IB=1;%20function%20isDigit(c)%20%7B%20return%20(%220%22%20%3C=%20c%20&&%20c%20%3C=%20%229%22)%20%7D%20L%20=%20location.href;%20LL%20=%20L.length;%20for%20(e=LL-1;%20e%3E=0;%20--e)%20if%20(isDigit(L.charAt(e)))%20%7B%20for(s=e-1;%20s%3E=0;%20--s)%20if%20(!isDigit(L.charAt(s)))%20break;%20break;%20%7D%20++s;%20if%20(e%3C0)%20return;%20oldNum%20=%20L.substring(s,e+1);%20newNum%20=%20%22%22%20+%20(parseInt(oldNum,10)%20+%20IB);%20while%20(newNum.length%20%3C%20oldNum.length)%20newNum%20=%20%220%22%20+%20newNum;%20location.href%20=%20L.substring(0,s)%20+%20newNum%20+%20L.slice(e+1);%20%7D)();
share

Shameless plug, but in addition to the Amazon Wishlist bookmarklet I use the Woot This Deal Button when I find a good deal for a product online that I want to buy.

share

I use SuperGenPass to hash my master password into unique passwords for the sites I visit (the hash is based on the domain). Very convenient.

share

Long URL Please

Rewrites most shortened URLs on a page to show where they will take you.

share

Not the answer you're looking for? Browse other questions tagged or ask your own question.