OLD | NEW |
1 <script type="text/javascript"> | 1 <script type="text/javascript"> |
2 function loadAbort(evt) { | 2 function loadAbort(evt) { |
3 document.title = evt.type; | 3 document.title = evt.type; |
4 } | 4 } |
5 function loadStart(evt) { | 5 function loadStart(evt) { |
6 document.title = evt.url; | 6 document.title = evt.url; |
7 } | 7 } |
| 8 var redirectOldUrl; |
| 9 var redirectNewUrl; |
| 10 function loadRedirect(event) { |
| 11 document.title = "redirected"; |
| 12 if (event.isTopLevel) { |
| 13 redirectOldUrl = event.oldUrl; |
| 14 redirectNewUrl = event.newUrl; |
| 15 } |
| 16 } |
8 function SetSrc(src) { | 17 function SetSrc(src) { |
9 var plugin = document.getElementById('plugin'); | 18 var plugin = document.getElementById('plugin'); |
10 plugin.src = src; | 19 plugin.src = src; |
11 } | 20 } |
12 function SetSize(w, h) { | 21 function SetSize(w, h) { |
13 var plugin = document.getElementById('plugin'); | 22 var plugin = document.getElementById('plugin'); |
14 plugin.width = w; | 23 plugin.width = w; |
15 plugin.height = h; | 24 plugin.height = h; |
16 } | 25 } |
17 function Back() { | 26 function Back() { |
(...skipping 18 matching lines...) Expand all Loading... |
36 tabindex="0" | 45 tabindex="0" |
37 type="application/new-browser-plugin" | 46 type="application/new-browser-plugin" |
38 width="640" | 47 width="640" |
39 height="480" | 48 height="480" |
40 border="0px"></object> | 49 border="0px"></object> |
41 | 50 |
42 <script> | 51 <script> |
43 var plugin = document.getElementById('plugin'); | 52 var plugin = document.getElementById('plugin'); |
44 plugin.addEventListener('loadStart', loadStart); | 53 plugin.addEventListener('loadStart', loadStart); |
45 plugin.addEventListener('loadAbort', loadAbort); | 54 plugin.addEventListener('loadAbort', loadAbort); |
| 55 plugin.addEventListener('loadRedirect', loadRedirect); |
46 </script> | 56 </script> |
OLD | NEW |