Last active
September 15, 2015 02:33
-
-
Save jebai0521/809dbe79a0f37c3d122c to your computer and use it in GitHub Desktop.
自动打开新的页面
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
| <script type="text/javascript"> | |
| if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { | |
| var timer = setInterval(function(){ | |
| clearInterval(timer); | |
| var a=document.getElementById("ipa"); | |
| var dispatch = document.createEvent("HTMLEvents"); | |
| dispatch.initEvent("click", true, true); | |
| a.dispatchEvent(dispatch); | |
| }, | |
| 1000 //延时 | |
| ); | |
| } else if (/(Android)/i.test(navigator.userAgent)) { | |
| var timer = setInterval(function(){ | |
| clearInterval(timer); | |
| var a=document.getElementById("apk"); | |
| var dispatch = document.createEvent("HTMLEvents"); | |
| dispatch.initEvent("click", true, true); | |
| a.dispatchEvent(dispatch); | |
| }, | |
| 1000 //延时 | |
| ); | |
| } else { | |
| var timer = setInterval(function(){ | |
| clearInterval(timer); | |
| window.open('http://www.sammyun.com'); | |
| }, | |
| 1000 //延时 | |
| ); | |
| }; | |
| </script> | |
| <a id="ipa" class="hide" href="https://itunes.apple.com/us/app/xiao-shu-tong/id998300098?l=zh&ls=1&mt=8"></a> | |
| <a id="apk" class="hide" href="https://dev.xxx.com.cn/p/xiaoshutong.apk></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment