Add files via upload

This commit is contained in:
林木木
2022-10-09 21:08:57 +08:00
committed by GitHub
parent 3b09ba3255
commit b09ebc960f
12 changed files with 585 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
chrome.contextMenus.create({
title: "记下 “%s”",
contexts: ['selection'],
onclick: function(info, tab){
//设定打开页面的一些初始值
console.log(info);
chrome.storage.sync.set({open_action: "save_text",open_content:info.selectionText}, function() {
chrome.windows.create({
url: chrome.extension.getURL("html/popup.html"),
left: 50,
top: 50,
width: 550,
height: 300,
type: "popup"
});
});
}
});