jiffyreader.com icon indicating copy to clipboard operation
jiffyreader.com copied to clipboard

Ability to Toggle On/Off On Specific HTML Tags

Open wjwalcher opened this issue 2 years ago • 5 comments

It would be great if you could choose/modify/add HTML tags which you would like to include/exclude from being converted to Bionic text. On top of this, it would be cool if these tag preferences could be associated to a given website and persisted. 🙂

wjwalcher avatar May 23 '22 16:05 wjwalcher

@wjwalcher I'm happy to do this, but I'm not sure how I'd store the preferences. I could store the paths to the 'tags', but since js doesn't have a simple way to get an element's path I'd probably have to complicate the program a bit much (i.e. copy/paste from stackoverflow).

bolshoytoster avatar May 23 '22 22:05 bolshoytoster

@bolshoytoster Maybe what you're thinking of is more complicated than what I had imagined -- I was thinking you could store something along the lines of: { websiteURI: [list of tag names] }

Then, whenever you navigate, just check the stored mapping of URIs <-> list of tags to enable Bionic text on. You could execute a call to document.getElementsByTagName() for each tag to get all the elements with a given tag.

Happy to work on/add something like this myself if you'd like!

wjwalcher avatar May 23 '22 23:05 wjwalcher

In the same vein -- would be nice if you could have an exclusion list of sites not to apply the Bionic text to when you have the extension set to 'Toggle on default'.

wjwalcher avatar May 24 '22 00:05 wjwalcher

@wjwalcher so you mean just blocking a whole tag? That would probably block more than you'd want though.

bolshoytoster avatar May 24 '22 07:05 bolshoytoster

@wjwalcher the blacklist exlusion list is now present in release 0.0.5 but check for 0.0.6, simply toggle site preference and then toggle off onPageLoad

about the exclusion tags, i think we can treat it like a css selector and use that to eleminate elements that we do not want bolded.

Would that work for how you envision the feature?

asieduernest12 avatar Jun 05 '22 10:06 asieduernest12