mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58: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) {
|
chrome.history.onVisited.addListener(function(item) {
|
||||||
can.run({}, ["history", item.id, item.title, item.url])
|
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", {
|
var can = Volcanos("chrome", {
|
||||||
|
video: function(can) {
|
||||||
|
},
|
||||||
}, [], function(can) {
|
}, [], function(can) {
|
||||||
can.user = user
|
can.user = user
|
||||||
can.page = page
|
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,
|
"manifest_version": 2,
|
||||||
"name": "volcanos",
|
"name": "volcanos",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"icons": {
|
||||||
|
"16": "favicon.png",
|
||||||
|
"48": "favicon.png",
|
||||||
|
"128": "favicon.png"
|
||||||
|
},
|
||||||
"background": {"page": "/chrome/chrome.html"},
|
"background": {"page": "/chrome/chrome.html"},
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_icon": "/favicon.ico",
|
"default_icon": "/favicon.png",
|
||||||
"default_popup": "/chrome/popup.html"
|
"default_popup": "/chrome/popup.html"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
@ -25,6 +30,7 @@
|
|||||||
"cookies",
|
"cookies",
|
||||||
"bookmarks",
|
"bookmarks",
|
||||||
"notifications",
|
"notifications",
|
||||||
|
"contextMenus",
|
||||||
"*://localhost/*",
|
"*://localhost/*",
|
||||||
"*://localhost:9020/*"
|
"*://localhost:9020/*"
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user