evenBetterURL Bookmarklet

When executed, it creates square elements marked with "#" above all elements with id attribute. Clicking on the square adds particular id to the URL as hash, thus creating URL which leads to particular place on the website. Because the way that some websites work, such link should be checked before sharing it with others. Executing bookmarklet again will toggle its effect.

The bookmarklet is released on MIT license.

Source (mini.krzysiu.net)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%257Bfunction%2520callback%28%29%257B%28function%28%2524%29%257Bvar%2520jQuery%253D%2524%253Bvar%2520jMarkId%2520%253D%2520jQuery.noConflict%28%29%253Bif%28jMarkId%28%27.markIdStyle%27%29.length%29%257BjMarkId%28%27.markIdStyle%27%29.remove%28%29%253B%257Delse%2520%257BjMarkId%28%27body%27%29.append%28%2522%253Cstyle%253E.markIdStyle%257Bposition%253Aabsolute%21important%253Bline-height%253A20px%253Btext-align%253Acenter%21important%253Bfont-size%253A20px%21important%253Bborder%253A2px%2520solid%2520red%21important%253Bbackground%253A%2523000%21important%253Bcolor%253A%2523fff%21important%253Bfont-weight%253A700%21important%253Bwidth%253A20px%21important%253Bheight%253A20px%21important%253Bposition%253Aabsolute%21important%253Bz-index%253A50000%21important%253Btext-decoration%253Anone%21important%257D.markIdStyle%253Ahover%257Bcolor%253Ared%21important%253Bborder%253A2px%2520solid%2520%2523fff%21important%257D%253C%252Fstyle%253E%2522%29%253BjMarkId%28%27%255Bid%255D%27%29.each%28function%28%29%2520%257Bvar%2520ePos%2520%253D%2520jMarkId%28this%29.offset%28%29%253BjMarkId%28%27body%27%29.append%28%27%253Ca%2520class%253D%2522markIdStyle%2522%2520style%253D%2522top%253A%27%252BePos.top%252B%27px%253Bleft%253A%27%252BePos.left%252B%27px%2522%2520onclick%253D%2522javascript%253Awindow.location.hash%253D%255C%27%27%252BjMarkId%28this%29.attr%28%2522id%2522%29%252B%27%255C%27%253Bevent.preventDefault%28%29%2522%2520href%253D%2522%2523%2522%253E%2523%253C%252Fa%253E%27%29%253B%257D%29%253B%257D%257D%29%28jQuery.noConflict%28true%29%29%257Dvar%2520s%253Ddocument.createElement%28%2522script%2522%29%253Bs.src%253D%2522https%253A%252F%252Fajax.googleapis.com%252Fajax%252Flibs%252Fjquery%252F1.7.1%252Fjquery.min.js%2522%253Bif%28s.addEventListener%29%257Bs.addEventListener%28%2522load%2522%252Ccallback%252Cfalse%29%257Delse%2520if%28s.readyState%29%257Bs.onreadystatechange%253Dcallback%257Ddocument.body.appendChild%28s%29%253B%257D%29%28%29


Rate it:


Tags:

Comments

Comments so far. Add yours.