Can you guide me at depelopping a simple extension?

I’m totally new to extensions scripting and I want to know what should I learn to write what i have in mind.

I want firefox to be less friendly with content other than text as I tend to use slow computers. But I want also to be able to access this not esserntial content when I want so.

I think that for a start something like a modified beastify script would do the job. The modifications must be: inject css code to every tab unless the (un)beastify buton is pressed, then content in that tab and only that tab, should be shown.

If you’re familiar with the beastify script you will know that it does exactly the opposite, so I need to reverse the condition testing.

I already tryied but my own but something didn’t work.

Can yopu tell me how to do so? Also can you tell me wich other functions and resources you think i will find usefull? thanks.

Hiding the content in tabs that aren’t shown will not help you with performance, only closing or suspending a tab could help performance, since it stops all long running code from running.

Some extensions block content by type, for example, images or videos or fonts. I don’t know whether any of them can prevent Firefox from making the request – so that the file is never received – or they can only discard the results. If you find an extension that is effective with any particular type of content, you might be able to apply that method to what you want to block.

At least it would lease some memory graphics, surely your method is better. Could you tell me what would be the api function?

I’m pretty certain Firefox doesn’t keep pages that aren’t shown in your graphics memory, but yes, using https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/discard is the better way to make tabs not run at all. Note that this will lead to the page being reloaded once you go back to the tab.

Note or not? if note, is any way of preventing resuming on focus?

Mostly not selecting the tab. Firefox assumes that when you click on a tab, you want to see its contents. Else close the tab and re-open it from a menu (so more of a “session management” system).