Last active
December 18, 2015 05:29
-
-
Save andershaig/5732665 to your computer and use it in GitHub Desktop.
Simple Redirect - This doesn't worry about social referral tracking, providing a different URL for mobile etc. It's just meant to be easier to understand and implement.
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
| {% plugin rawtext desktop_redirect_url %} | |
| <script type="text/javascript"> | |
| if (!document.body.className.match('page_preview')) { | |
| // Redirects as soon as possible | |
| setInterval( function () { | |
| top.location.replace({{ desktop_redirect_url | json }}); | |
| },250); | |
| } | |
| </script> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions
That's it!