| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <script> |
| 4 function triggerPrompt() { |
| 5 document.getElementById('flash-link').click(); |
| 6 window.domAutomationController.send(true); |
| 7 } |
| 8 |
| 9 function triggerPromptViaNewWindow() { |
| 10 document.getElementById('flash-new-window-link').click(); |
| 11 window.domAutomationController.send(true); |
| 12 } |
| 13 |
| 14 function flashIsEnabled() { |
| 15 var plugin = document.getElementById('flash-object'); |
| 16 plugin.addEventListener('message', function handleEvent(event) { |
| 17 if (event.data.source === 'getPowerSaverStatusResponse') { |
| 18 plugin.removeEventListener('message', handleEvent); |
| 19 window.domAutomationController.send(true); |
| 20 } |
| 21 }); |
| 22 if (plugin.postMessage) { |
| 23 plugin.postMessage('getPowerSaverStatus'); |
| 24 } else { |
| 25 window.domAutomationController.send(false); |
| 26 } |
| 27 } |
| 28 </script> |
| 29 <body> |
| 30 <object id="flash-object" name="plugin" data="test.swf" |
| 31 type="application/x-shockwave-flash" width="400" height="100"> |
| 32 Flash not supported. |
| 33 <br> |
| 34 <a href="https://get.adobe.com/flashplayer/" id="flash-link"> |
| 35 Download Flash. |
| 36 </a> |
| 37 <a id="flash-new-window-link" |
| 38 onclick="window.open('https://get.adobe.com/flashplayer/');"> |
| 39 Download Flash window.open |
| 40 </a> |
| 41 </object> |
| 42 </body> |
| 43 </html> |
| OLD | NEW |