I pulled out the simple stuff from popup.js into native JS code; but as I started working on options.js I think the code turned out worse (more complex and more brittle... what is the VanillaJS equivalent of $.closest?!); so I've left it as is.
A better approach might be to put some structure around the Options page using something like Angular, but that's a separate endeavor I dunno if you want to go down.
Related to #4
I pulled out the simple stuff from popup.js into native JS code; but as I started working on options.js I think the code turned out worse (more complex and more brittle... what is the VanillaJS equivalent of
$.closest
?!); so I've left it as is.A better approach might be to put some structure around the Options page using something like Angular, but that's a separate endeavor I dunno if you want to go down.