OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 function log(message) |
| 5 { |
| 6 var item = document.createElement("li"); |
| 7 item.appendChild(document.createTextNode(message)); |
| 8 document.getElementById("console").appendChild(item); |
| 9 } |
| 10 |
| 11 function return_malware_prefetch() { |
| 12 var pathArray = window.location.pathname.split('/'); |
| 13 var newPathname = ""; |
| 14 for ( i=0; i < pathArray.length - 1; i++ ) { |
| 15 newPathname += pathArray[i]; |
| 16 newPathname += "/"; |
| 17 } |
| 18 newPathname += "malware.html"; |
| 19 var href = window.location.protocol + "//" + window.location.host + newPathn
ame; |
| 20 var link = document.createElement("link"); |
| 21 link.rel = "prefetch"; |
| 22 link.href = href; |
| 23 log(link.outerHTML); |
| 24 return link;
} |
| 25 |
| 26 function add_prefetch(element) { |
| 27 var head = document.getElementsByTagName("head")[0]; |
| 28 head.appendChild(element); |
| 29 } |
| 30 </script> |
| 31 </head> |
| 32 <body onload="add_prefetch(return_malware_prefetch());"> |
| 33 This page is not malware, <a href="malware.html">but this page is</a>. If |
| 34 prefetches don't trigger safe browsing interstitials, then this page |
| 35 should work in a dandy manner. |
| 36 <p><ol id="console"></ol></p> |
| 37 </body> |
| 38 </html> |
OLD | NEW |