单击chrome扩展时,按钮不会变暗

时间:2015-11-23 12:51:52

标签: google-chrome-extension

我有一个镀铬扩展名,按钮在点击时不会变暗:

var alreadyClicked = false;
var timer;

chrome.browserAction.onClicked.addListener(function (tab) {

        //code for when dobleclicked

        timer = setTimeout(function () {
        chrome.tabs.update({
            url: "http://url.html"
        });

        clearTimeout(timer);

        alreadyClicked = false;
    }, 250);
});

翻译扩展程序的按钮示例:

正常:enter image description here点击:enter image description here

0 个答案:

没有答案