mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt favicon
This commit is contained in:
parent
e88d504f5c
commit
70b37afefe
@ -61,5 +61,16 @@ var can = Volcanos("chrome", {
|
||||
chrome.history.onVisited.addListener(function(item) {
|
||||
can.run({}, ["history", item.id, item.title, item.url])
|
||||
})
|
||||
chrome.contextMenus.create({
|
||||
title: "favor",
|
||||
onclick: function(event) {
|
||||
chrome.tabs.query({ active: true}, function (tabs) {
|
||||
chrome.tabs.sendMessage(tabs[0].id, { action: "copy" }, function (response) {
|
||||
console.log(response)
|
||||
can.run({}, ["history", "id", response.title, response.src])
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
var can = Volcanos("chrome", {
|
||||
video: function(can) {
|
||||
},
|
||||
}, [], function(can) {
|
||||
can.user = user
|
||||
can.page = page
|
||||
|
BIN
favicon.png
Normal file
BIN
favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -2,9 +2,14 @@
|
||||
"manifest_version": 2,
|
||||
"name": "volcanos",
|
||||
"version": "0.0.1",
|
||||
"icons": {
|
||||
"16": "favicon.png",
|
||||
"48": "favicon.png",
|
||||
"128": "favicon.png"
|
||||
},
|
||||
"background": {"page": "/chrome/chrome.html"},
|
||||
"browser_action": {
|
||||
"default_icon": "/favicon.ico",
|
||||
"default_icon": "/favicon.png",
|
||||
"default_popup": "/chrome/popup.html"
|
||||
},
|
||||
"content_scripts": [
|
||||
@ -25,6 +30,7 @@
|
||||
"cookies",
|
||||
"bookmarks",
|
||||
"notifications",
|
||||
"contextMenus",
|
||||
"*://localhost/*",
|
||||
"*://localhost:9020/*"
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user