mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-28 13:39:44 +07:00
28 lines
643 B
JavaScript
Executable File
28 lines
643 B
JavaScript
Executable File
onload = function() {
|
|
function update() {
|
|
['screenX', 'screenY', 'innerWidth', 'innerHeight'].forEach(function(prop) {
|
|
document.getElementById(prop).innerText = window[prop];
|
|
});
|
|
|
|
webkitRequestAnimationFrame(update);
|
|
}
|
|
|
|
update();
|
|
|
|
var minimizeNode = document.getElementById('minimize-button');
|
|
if (minimizeNode) {
|
|
minimizeNode.onclick = function() {
|
|
chrome.runtime.getBackgroundPage(function(background) {
|
|
background.minimizeAll();
|
|
});
|
|
};
|
|
}
|
|
|
|
var closeNode = document.getElementById('close');
|
|
if (closeNode) {
|
|
closeNode.onclick = function() {
|
|
window.close();
|
|
};
|
|
}
|
|
}
|