Skip to content

Instantly share code, notes, and snippets.

@tomlea
Created April 17, 2010 17:39

Revisions

  1. tomlea created this gist Apr 17, 2010.
    24 changes: 24 additions & 0 deletions goviasGrid.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    javascript:
    if( !window.goviasGrid ){
    window.goviasGrid = document.createElement("div");
    document.getElementsByTagName("body")[0].appendChild(window.goviasGrid);
    window.goviasGrid.style.background = "url(http://tomlea.co.uk/assets/the-grid.png) repeat-y 50% 0";
    window.goviasGrid.style.width = "100%";
    window.goviasGrid.style.height = "100%";
    window.goviasGrid.style.position = "fixed";
    window.goviasGrid.style.top = "0";
    window.goviasGrid.style.bottom = "0";
    window.goviasGrid.style.left = "0";
    window.goviasGrid.style.right = "0";
    window.goviasGrid.style.display = "none";
    window.goviasGrid.style.zIndex = "99999";
    window.goviasGrid.onclick = function(el){ window.goviasGrid.style.display = "none"; };
    }

    if( window.goviasGrid.style.display == "none"){
    window.goviasGrid.style.display = "block";
    }else{
    window.goviasGrid.style.display = "none";
    }

    undefined;