]>
git.wh0rd.org - chrome-ext/waterfall-buildbot-clicker.git/blob - background.js
1 // Copyright 2014 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 var storage
= chrome
.storage
.local
;
7 // When visiting a waterfall page, show the icon.
8 console
.log('going...');
9 chrome
.webNavigation
.onCommitted
.addListener(function(e
) {
11 }, {url
: [{hostEquals
: 'uberchromegw.corp.google.com'},
12 {hostEquals
: 'chromegw.corp.google.com'}]});
14 function onClicked(tab
) {
15 if (window
.confirm('nuke them all?')) {
16 chrome
.tabs
.executeScript(tab
.id
, {
17 'file': 'click_all.js'
22 chrome
.pageAction
.onClicked
.addListener(onClicked
);
24 function setIcon(tabId
) {
25 //chrome.pageAction.setPopup({'tabId':tabId, 'popup':'popup.html'});
26 chrome
.pageAction
.setIcon({'tabId':tabId
, 'path':'icon-96x96.png'});
27 chrome
.pageAction
.setTitle({'tabId':tabId
, 'title':'Nuke It'});
28 chrome
.pageAction
.show(tabId
);