Replies: 1 comment 1 reply
-
You could use something like this: // ==UserScript==
// @name test
// @include main
// ==/UserScript==
window.messageManager.loadFrameScript('data:, (' + function () {
addEventListener('DOMContentLoaded', () => {
const { console, document, location, setTimeout, window } = content;
if (!location.href !== 'moz-extension://92d2cbae-768f-469d-b49e-dd4852839ff1/reader.html')
return;
setTimeout(() => {
console.log('hi');
var favicon = document.querySelector('link[href="images/reader16.png"]');
favicon.setAttribute("href", "images/reader48.png");
}, 2000);
});
}.toString() + ')()', true); Not tested. There are possible optimizations, this is simple demo code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to run a simple script on a page created by an add-on but it's not working. Is this possible via userChrome.js? Normally I'd use Tampermonkey for this sort of thing, but that can't run on pages created by other extensions.
Beta Was this translation helpful? Give feedback.
All reactions