Created
June 14, 2011 21:55
-
-
Save atxryan/1026013 to your computer and use it in GitHub Desktop.
Box.net Maximize preview in window bookmarklet
This file contains hidden or 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(d)%20{var%20h%20=%20d.body.clientHeight;var%20w%20=%20d.body.clientWidth;var%20p%20=%20d.getElementById(%22player%22);var%20g%20=%20d.getElementById(%22gallery%22);g.style.position%20=%20%22absolute%22;g.style.width%20=%20w%20+%20%22px%22;g.style.height%20=%20h%20+%20%22px%22;p.style.width%20=%20w%20+%20%22px%22;p.style.height%20=%20h%20+%20%22px%22;p.style.position%20=%20%22relative%22;g.style.top%20=%20%220%22;g.style.left%20=%20%220%22;g.style.zIndex%20=%20%2210000%22;p.setAttribute(%22width%22,%20w);p.setAttribute(%22height%22,%20h);})(document); |
This file contains hidden or 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
(function(d) { | |
var h = d.body.clientHeight; | |
var w = d.body.clientWidth; | |
var p = d.getElementById("player"); | |
var g = d.getElementById("gallery"); | |
g.style.position = "absolute"; | |
g.style.width = w + "px"; | |
g.style.height = h + "px"; | |
p.style.width = w + "px"; | |
p.style.height = h + "px"; | |
p.style.position = "relative"; | |
g.style.top = "0"; | |
g.style.left = "0"; | |
g.style.zIndex = "10000"; | |
p.setAttribute("width", w); | |
p.setAttribute("height", h); | |
})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Box.net shows their document previews in an object w/ a width of 714px. It's annoying when trying to zoom into to a document, but then having to drag the doc around to get it in the view pane. Sure, there's a full screen mode, but that exits as soon as you click else where.