About this Entry
Posted by: AtnNn

Visit AtnNn's Xanga Site

Original: 2/25/2007 1:03 AM
Views: 9
Comments: 1
eProps: 2

Read Comments
Post a Comment
Back to Your Xanga Site


Who gave the eProps?
2 eProps!2 eProps! 2 eProps from:
AssassinFox

Sunday, February 25, 2007

Snap preview

 I can't beleive that xanga added snap previews. Those little popups are incredibly annoying. But they can be fun to! To customize what shows when your xanga site gets cached by snap, add the follwing code to your header section in the look&feel page:


<script>
// first load ip.js, a trivial script i wrote that creates a getip() function that returns the REMOTE_ADDR
document.
write("<"+"script type=\"text/javascript\" src=\"http://www.atnnn.com/ip.js.php?auth=nopassword\"></"+"script>");
</script>

<script>
if(getip().match("38.98.19")){ // verify if this is snap
document.body.innerHTML="<h1> YOUR HTML HERE </h1>";

//block the xanga advertisements (only for the snap bot)
function returnNull(){null;}
document.
write=returnNull;
function returnTrue(){return true;}
window.
onerror=returnTrue;
}
</script>


If your page hasn't been cached yet, the snap preview of your page will then show whatever text or image you put in the innerHTML.
 Posted 2/25/2007 1:03 AM - 9 views - 1 comments

Give eProps or Post a Comment

1 Comment

Visit AssassinFox's Xanga Site!
Sweet! Thanks for the code!
Posted 4/25/2007 10:36 PM by AssassinFox - reply


Choose Identity
(?)
 
Give eProps (?)
Post a Comment
Add Link | Preview HTML comment help 
  • Say it with Minis! (?)

Profile Pic:
Default  |  Choose »  (?)



Back to AtnNn's Xanga Site!
Note: your comment will appear in AtnNn's local time zone:
GMT -05:00 (Eastern Standard - US, Canada)