| OLD | NEW |
| 1 title=ABP Test Pages | 1 title=ABP Test Pages |
| 2 template=blank | 2 template=frame |
| 3 | |
| 4 <head> | |
| 5 <style> | |
| 6 html, body { margin: 0; height: 100%; } | |
| 7 #iframe { display: block; width: 100%; height: 100%; border: none; } | |
| 8 </style> | |
| 9 </head> | |
| 10 | |
| 11 <iframe id="iframe"></iframe> | |
| 12 | 3 |
| 13 <script type="text/javascript"> | 4 <script type="text/javascript"> |
| 14 var iframe = document.getElementById("iframe") | 5 function transform_url(href, hash) |
| 15 function update_iframe_location() | |
| 16 { | 6 { |
| 17 var hash = window.location.hash; | 7 return href.substr(0, href.length - hash.length). |
| 18 if (hash) | 8 replace("://testpages", "://www.testpages") + hash.substring(1); |
| 19 { | |
| 20 var url = window.location.href. | |
| 21 substr(0, window.location.href.length - hash.length). | |
| 22 replace("://testpages", "://www.testpages") + hash.substring(1); | |
| 23 | |
| 24 iframe.src = url; | |
| 25 } | |
| 26 } | 9 } |
| 27 window.addEventListener("hashchange", update_iframe_location); | |
| 28 update_iframe_location(); | |
| 29 </script> | 10 </script> |
| OLD | NEW |