• en
  • sv
6

Custom Safari Topsites Preview like iCloud, Is it possible?

Today I want to highlight a little javascript that was lifted from the iCloud source code by nikf.org, in order to try and duplicate the custom logo that iCloud gets in the Safari topsites feature. Personally, I haven’t gotten this snippet to work on any website, which leads me to believe there is something else going on in here.

However, you should try! Here is the code which detects the purpose of the loading of the page and sends you (if it is previewing your page) to a custom HTML page that has the custom preview logo.

<script>if(window.navigator&&window.navigator.loadPurpose==="preview"){window.location.href="https://www.icloud.com/topsites_preview/"
};</script>

About the author

Erik Bernskiold is the owner of XLD Studios and software education company Bernskiold Media. He is a WordPress lover, speaker and self-proclaimed tech geek, located in Gothenburg, Sweden.

  • http://twitter.com/raffael_me Raffael H.

    Nice!
    How did you get behind it?