mardi 2 mai 2017

Content Script Injection into stackoverflow domains from Firefox

I had an idea for a quick fix to something that bugs me every now and again. Easily distractable programmer that I am, every once in a while when my energy flags, I'll be looking at some stackoverflow question and then some little "Hot Network Question" about the physics of the death star or linguistic analysis of Yoda's speech will catch my eye and then - boom, just like that - I've lost my train of thought.

So, I was following this guide to FF web extensions to come up with a solution -- just set the div to hidden with vanilla js. I'm able to both log to console and manipulate the DOM on Mozilla domains. However, on stackoverflow as well as most other sites, I wasn't even able to log to console using my content script after having changed the match pattern. Is there a way to see whether my content script is getting blocked?




Aucun commentaire:

Enregistrer un commentaire