1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

stubbing out some overlay framework

This commit is contained in:
Kyle Spearrin
2016-09-21 23:41:53 -04:00
parent b2eb7910ee
commit 714328d13a
4 changed files with 78 additions and 0 deletions

View File

@@ -136,6 +136,32 @@ chrome.contextMenus.onClicked.addListener(function (info, tab) {
}
});
function messageCurrentTab(command, data) {
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
var tabId = null;
if (tabs.length > 0) {
tabId = tabs[0].id;
}
else {
return;
}
if (!tabId) {
return;
}
var obj = {
command: command
};
if (data) {
obj['data'] = data;
}
chrome.tabs.sendMessage(tabId, obj);
});
}
function autofillPage(site) {
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
var tabId = null;