diff --git a/background.js b/background.js index 63177f9..4ee1b39 100644 --- a/background.js +++ b/background.js @@ -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() { diff --git a/content.js b/content.js index 0f63f19..9346159 100644 --- a/content.js +++ b/content.js @@ -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"); diff --git a/manifest.json b/manifest.json index 387f9b9..aaeae07 100644 --- a/manifest.json +++ b/manifest.json @@ -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 } } \ No newline at end of file