Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <script>
- function acomponent()
- {
- try{return new XMLHttpRequest()}
- catch(e)
- {
- try{return new ActiveXObject('Msxml2.XMLHTTP')}
- catch(e)
- {
- try{return new ActiveXObject('Microsoft.XMLHTTP')}
- catch(e)
- {
- return null
- }
- }
- }
- }
- function getLink()
- {
- var connected = acomponent();
- if (connected)
- {
- connected.open('get', './link.txt');
- connected.onreadystatechange = function ()
- {
- if (connected.readyState == 4)
- {
- if (connected.responseText != '')
- {
- location.href = connected.responseText;
- }
- }
- }
- connected.send(null);
- }
- }
- window.onload = function(){getLink();};
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement