This commit is contained in:
蒋国宝 2015-11-20 00:01:19 +08:00
parent 9f3eed6829
commit e52ff430c2
2 changed files with 8 additions and 2 deletions

View File

@ -10,6 +10,7 @@
"default_popup": "popup.html"
},
"permissions": [
"activeTab"
"activeTab",
"tabs"
]
}

View File

@ -1,8 +1,13 @@
function query(key) {
var url;
chrome.tabs.query({'active': true, 'lastFocusedWindow': true}, function (tabs) {
url = tabs[0].url;
});
if (key == 'abc') {
return null;
} else {
return 'result:' + key;
return 'result:' + key + url;
}
};