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({
@ -49,9 +49,9 @@ chrome.pageAction.onClicked.addListener(function() {
});
*/
openTab("popup.html");
// openTab("popup.html");
});
//});
function newTab() {

View File

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

View File

@ -11,16 +11,6 @@
"24":"icon24.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": [
"activeTab",
"declarativeContent",
@ -29,23 +19,14 @@
"https://*/*"
],
"content_scripts": [
{
"js": [
"jquery/3.4.1/jquery.min.js",
"bootstrap/3.4.1/bootstrap.min.js"
],
"matches": [
"http://*/*",
"https://*/*"
]
},
{
"js" : [
"content.js"
"jquery/3.4.1/jquery.min.js",
"content.js"
],
"matches" : [
"http://*/*",
"https://*/*"
"http://www.instagram.com/*",
"https://www.instagram.com/*"
],
"run_at" : "document_idle"
}
@ -56,6 +37,6 @@
"bootstrap/3.4.1/bootstrap.min.js",
"background.js"
],
"persistent": true
"persistent": false
}
}