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; | 8 var redirectOldUrl; |
9 var redirectNewUrl; | 9 var redirectNewUrl; |
10 function loadRedirect(event) { | 10 function loadRedirect(event) { |
11 document.title = "redirected"; | 11 document.title = "redirected"; |
12 if (event.isTopLevel) { | 12 if (event.isTopLevel) { |
13 redirectOldUrl = event.oldUrl; | 13 redirectOldUrl = event.oldUrl; |
14 redirectNewUrl = event.newUrl; | 14 redirectNewUrl = event.newUrl; |
15 } | 15 } |
16 } | 16 } |
| 17 var shouldEchoTitle = false; |
| 18 function titleChanged(evt) { |
| 19 if (shouldEchoTitle) |
| 20 document.title = evt.title; |
| 21 } |
17 function SetSrc(src) { | 22 function SetSrc(src) { |
18 var plugin = document.getElementById('plugin'); | 23 var plugin = document.getElementById('plugin'); |
19 plugin.src = src; | 24 plugin.src = src; |
20 } | 25 } |
21 function SetSize(w, h) { | 26 function SetSize(w, h) { |
22 var plugin = document.getElementById('plugin'); | 27 var plugin = document.getElementById('plugin'); |
23 plugin.width = w; | 28 plugin.width = w; |
24 plugin.height = h; | 29 plugin.height = h; |
25 } | 30 } |
26 function Back() { | 31 function Back() { |
(...skipping 19 matching lines...) Expand all Loading... |
46 type="application/browser-plugin" | 51 type="application/browser-plugin" |
47 width="640" | 52 width="640" |
48 height="480" | 53 height="480" |
49 border="0px"></object> | 54 border="0px"></object> |
50 | 55 |
51 <script> | 56 <script> |
52 var plugin = document.getElementById('plugin'); | 57 var plugin = document.getElementById('plugin'); |
53 plugin.addEventListener('loadStart', loadStart); | 58 plugin.addEventListener('loadStart', loadStart); |
54 plugin.addEventListener('loadAbort', loadAbort); | 59 plugin.addEventListener('loadAbort', loadAbort); |
55 plugin.addEventListener('loadRedirect', loadRedirect); | 60 plugin.addEventListener('loadRedirect', loadRedirect); |
| 61 plugin.addEventListener('titleChanged', titleChanged); |
56 </script> | 62 </script> |
OLD | NEW |