This commit is contained in:
Ray 2020-08-05 23:47:45 +01:00
parent ce0882f035
commit 1b65027601
3 changed files with 15 additions and 30 deletions

View File

@ -31,7 +31,7 @@ chrome.runtime.onMessage.addListener(
); );
chrome.pageAction.onClicked.addListener(function() { //chrome.pageAction.onClicked.addListener(function() {
/* /*
chrome.tabs.query({ chrome.tabs.query({
@ -49,9 +49,9 @@ chrome.pageAction.onClicked.addListener(function() {
}); });
*/ */
openTab("popup.html"); // openTab("popup.html");
}); //});
function newTab() { function newTab() {

View File

@ -7,9 +7,13 @@ chrome.runtime.onMessage.addListener(
); );
// if (location_startsWith("www.google.com/")) { if (location_startsWith("www.instagram.com/")) {
// alert("Google!")
// } $("article img").attr("title", "hello");
}
// newTab(); // newTab();
// openTab("https://news.bbc.co.uk"); // openTab("https://news.bbc.co.uk");

View File

@ -11,16 +11,6 @@
"24":"icon24.png", "24":"icon24.png",
"16":"icon16.png" "16":"icon16.png"
}, },
"page_action" : {
"default_icon" : {
"128":"icon128.png",
"64":"icon64.png",
"48":"icon48.png",
"32":"icon32.png",
"24":"icon24.png",
"16":"icon16.png"
}
},
"permissions": [ "permissions": [
"activeTab", "activeTab",
"declarativeContent", "declarativeContent",
@ -29,23 +19,14 @@
"https://*/*" "https://*/*"
], ],
"content_scripts": [ "content_scripts": [
{
"js": [
"jquery/3.4.1/jquery.min.js",
"bootstrap/3.4.1/bootstrap.min.js"
],
"matches": [
"http://*/*",
"https://*/*"
]
},
{ {
"js" : [ "js" : [
"content.js" "jquery/3.4.1/jquery.min.js",
"content.js"
], ],
"matches" : [ "matches" : [
"http://*/*", "http://www.instagram.com/*",
"https://*/*" "https://www.instagram.com/*"
], ],
"run_at" : "document_idle" "run_at" : "document_idle"
} }
@ -56,6 +37,6 @@
"bootstrap/3.4.1/bootstrap.min.js", "bootstrap/3.4.1/bootstrap.min.js",
"background.js" "background.js"
], ],
"persistent": true "persistent": false
} }
} }