Created
April 27, 2012 07:57
-
-
Save fedmich/2507187 to your computer and use it in GitHub Desktop.
Chrome Extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.tabs.executeScript(null, | |
{code:"document.body.bgColor='red'"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url_js = '//example.com/js/script.js'; | |
chrome.tabs.executeScript(null, | |
{ | |
code:"var scrp = document.createElement('script'); scrp.src = '" + url_js + "?r='+(Math.random()*99999999); scrp.addEventListener('load', function() { }); document.head.appendChild(scrp);" | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var msg = 'Page succesfully scanned!'; | |
var obj = webkitNotifications.createNotification("http://i.imgur.com/5DgHw.jpg",msg,""); | |
obj.show(); | |
setTimeout( function(){ obj.cancel(); } , 1550 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment