Lor-Saba / Code-Injector

WebExtension
GNU General Public License v3.0
186 stars 41 forks source link

Automatic Injection Not Working #7

Open 0-SamboNZ-0 opened 5 years ago

0-SamboNZ-0 commented 5 years ago

Hi @Lor-Saba,

This is a nice plugin and in theory does exactly what I need, but I have been unable to get auto-injection working.

I can manually inject the code and it works fine, but regardless of whether the 'on load' option is enabled or not, I can't get it auto-injecting.

Firefox 68.0.1 (64bit) Code-Injector 0.2.1

Any assistance you could give me to troubleshoot this issue would be greatly appreciated.

Thanks,

Sam.

bunnyroo commented 4 years ago

I also have the same issue.

Code Injector v0.3.2 Firefox Developer 76.0b6 (64-bit)

exportio commented 2 years ago

Same issue. Manually works, but never automatically when the site is loaded. It even shows the number of rules applied, but they are not really applied. I wouldn't even mind a keyboard shortcut to manually apply rules.

Chrome 96 64-bit Version 0.3.2

rejuvenator commented 1 year ago

Same here. Have to inject manually each time.

Edge 111.0.1661.62 (64-bit) on Linux

dankirkd commented 1 year ago

Sometimes, with modern pages, onLoad is triggered before much of the content is actually loaded.

One work around that works is to add a delay, or to do so on a regular interval if the action is idempotent, or you can control undesired additional executions with a flag.

So for example:

function myFunction () {
   ...
}

// Execute the function immediately upon page load
myFunction();

// Then execute it every 5 seconds
myFunction(updateColors, 5000);