Reputation: 1
Writing my first firefox extension and I am trying to have it change the font-size on a webpage to one entered by the user.
However my extension at present does not seem to send out any request at all to change the font-size (or if it is not meant to actually contact the webpage as I somewhat expect is failing to change the font-size at all for the user anyway).
What does an extension need to have in it in order to try and change the styling of a webpage in this way?
I have tried having my extension use Content-Scripts and Background scripts, have used seperate and singular javascript files to handle the action, have tried text input and button presses from the user, and have tried to have the javascript see where fontsize is in the webpage and change it.
In the JSON file my extension has activeTab and contextMenus permissions, and when it is a Content-Script it is set to match on ["<all_urls>"].
Upvotes: 0
Views: 66
Reputation: 31760
What I ended up doing was going through every tag name for text (p, h1, h2, etc) and then changing their size to the size set by the user. This is not an optimal solution but for my purposes it does work.
This answer was posted as an edit to the question How to have firefox extension contact webpage to change Font-Size? (SOLVED) by the OP thatonescottishnobody under CC BY-SA 4.0.
Upvotes: 0