7.15 pm – Got the script to delete the previous style tags each time a new a new font and hence a new style tag is added.
9:30 – webfonts also working for different styels and weights now. Need to get the selectors working now.
10:17 – The selectors work. Its just that we need a way to updates the style tags in the DOM so the selecors work properly. Eg if you apply am update on all elements by not specifiying a selector, the * selector is put in by default to update all the text. But if we then put in a header selector it wont update the header because the style tag with the * is overriding it, so we need to think how we want this to work.
Could use the :not() selectro to exclude some tags, but this seems it can only be used in CSS, and ideally here I am looking for an HTML solution, since my style tags are being pushed to the DOM. If I cant find a :not() selector for CSS, I might have to see if I can push eveything to CSS as updates.
Will also need to save an array in the content script for the selectors, so as they are updated, we can save which selectors to keep, and each time generate new style tags for the selectors, so that we can also delete them on each round instead of allowing the number of style tags to keep growin.