Last active
August 29, 2015 13:58
-
-
Save panzi/10319120 to your computer and use it in GitHub Desktop.
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
The really strange thumbr theme you are using causes some very strange things. | |
It loads some other website in a "fullscreen" iframe that then in turn loads your | |
tumblr in another iframe. This causes the Browser Ponies JavaScript to be executed | |
twice, once in the toplevel frame and once in the inner most iframe. However the | |
ponies in the toplevel frame are somehow not visible, but they still cost CPU power. | |
Anyway, if you want to have the ponies always in the background, add this to the | |
source of your tumblr: | |
<style type="text/css">#content { position: relative; z-index: 100000000; }</style> | |
If you want to enable the "toggle ponies to background" function add this: | |
<script type="text/javascript"> | |
function toggleBrowserPoniesToBackground () { | |
var content = jQuery("#content"); | |
if (content.css("zIndex") === "100000000") { | |
content.css("zIndex", "auto"); | |
} | |
else { | |
content.css("zIndex", "100000000"); | |
} | |
} | |
</script> | |
Then a you can add a button somewhere to toggle the ponies: | |
<button type="button" onclick="BrowserPonies.togglePoniesToBackground();">Toggle | |
Browser Ponies to Background</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment