OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script> | |
4 var xhrStatus = -1; | |
5 var imgUrl = 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/images/bookmar k_manager_recent.png'; | |
6 | |
7 window.onload = function() { | |
8 history.pushState('', '', | |
9 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html'); | |
Charlie Reis
2013/02/22 02:45:17
Are we testing whether this is allowed? Maybe add
nasko
2013/02/22 17:14:35
Done.
| |
10 var xhr = new XMLHttpRequest(); | |
11 xhr.onreadystatechange = function() { | |
12 if (xhr.readyState == 4) { | |
13 xhrStatus = xhr.status; | |
14 if (xhrStatus == 200) { | |
15 document.getElementById('star').src = | |
16 window.URL.createObjectURL(this.response); | |
17 } | |
18 domAutomationController.setAutomationId(0); | |
19 domAutomationController.send(xhr.status); | |
20 } | |
21 } | |
22 xhr.open('GET', imgUrl); | |
23 xhr.responseType = 'blob'; | |
24 xhr.send(); | |
25 } | |
26 </script> | |
27 </head> | |
28 <body> | |
29 <img id='star'> | |
30 </body> | |
31 </html> | |
OLD | NEW |