Google Chrome themes are defined on the Chrome developer docs as follows:
A theme is a special kind of extension that changes the way the browser looks. Themes are packaged like regular extensions, but they don't contain JavaScript or HTML code.
(emphasis my own)
However I would like to apply some kind of theme which does run JavaScript on the page I load. How can I do this? I have tried adding
"permissions": ["<all_urls>"],
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": ["content.js"],
"run_at": "document_end" // pay attention to this line
}
],
to my manifest.json
and putting the content.js
file below in the same .crx
package as my manifest as per this answer
(function(window, chrome){
"use strict";
var doc = window.document;
doc.getElementById("mv-tiles").style.opacity = "0";
}(window, chrome));
but the code just doesn't run. Are there any workarounds?