Created
September 1, 2009 20:19
-
-
Save wmbest2/179351 to your computer and use it in GitHub Desktop.
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
{ | |
"name": "Sizerator", | |
"version": "1.0", | |
"description": "The first extension that I made.", | |
"toolstrips": [ | |
"my_toolstrip.html" | |
], | |
"permissions": [ | |
"tabs" | |
], | |
"content_scripts": [ | |
{ | |
"matches": ["http://*/*"], | |
"js": ["resizer.js"] | |
} | |
] | |
} |
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
<div class="toolstrip-button" id="button"> | |
<span>800 x 600</span> | |
</div> |
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
document.getElementById("button").onclick = function() { | |
var port chrome.self.connect(); | |
port.postMessage({width:800, height:600}); | |
} | |
chrome.extension.onConnect().addListener(function(port) { | |
port.onMessage.addListener( function( data ) { | |
window.width = data.width; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment