| <html> | |
| <head> | |
| <script> | |
| function log(message) | |
| { | |
| var item = document.createElement("li"); | |
| item.appendChild(document.createTextNode(message)); | |
| document.getElementById("console").appendChild(item); | |
| } | |
| function return_malware_prefetch() { | |
| var pathArray = window.location.pathname.split('/'); | |
| var newPathname = ""; | |
| for ( i=0; i < pathArray.length - 1; i++ ) { | |
| newPathname += pathArray[i]; | |
| newPathname += "/"; | |
| } | |
| newPathname += "malware.html"; | |
| var href = window.location.protocol + "//" + window.location.host + newPathname; | |
| var link = document.createElement("link"); | |
| link.rel = "prefetch"; | |
| link.href = href; | |
| log(link.outerHTML); | |
| return link; } | |
| function add_prefetch(element) { | |
| var head = document.getElementsByTagName("head")[0]; | |
| head.appendChild(element); | |
| } | |
| </script> | |
| </head> | |
| <body onload="add_prefetch(return_malware_prefetch());"> | |
| This page is not malware, <a href="malware.html">but this page is</a>. If | |
| prefetches don't trigger safe browsing interstitials, then this page | |
| should work in a dandy manner. | |
| <p><ol id="console"></ol></p> | |
| </body> | |
| </html> |