Created
July 20, 2010 02:36
-
-
Save jgarber623/482398 to your computer and use it in GitHub Desktop.
Grid Helper bookmarklet for web development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
if ( !document.getElementById( "__grid" ) ) { | |
d = document.createElement( "div" ); | |
d.setAttribute( "id", "__grid" ); | |
d.setAttribute( "style", "background: url('http://" + window.location.hostname + "/images/grid.png') repeat-y 50% 0; height: " + document.height + "px; left: 0; position: absolute; top: 0; width: 100%; z-index: 16000000;" ); | |
document.body.appendChild( d ); | |
} else { | |
document.body.removeChild( document.getElementById( "__grid" ) ); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one's pretty easy to use:
This code works best when you're running a Rails app or something similar where ~/images is off the root (e.g. http://localhost:3000/images/). Feel free to modify this to your heart's content.