Closed brandonkal closed 5 years ago
After further investigation, I have identified the issue and why I was only seeing it in FF Mac. This is a CORS issue that is thrown when the code cannot read a specific stylesheet. In my case, it was caused by the Saka Key browser extension. Because deqaf is attempting to read the stylesheet injected by the extension, an error is thrown. This will also happen for stylesheets from other origins depending on the CORS configuration.
I would suggest wrapping in a try{} when attempting to read stylesheet.cssRules so it can reach the stylesheet that should be processed.
Awesome work by the way!
Thanks @brandonkal, I think I know just the fix that's needed here, so I've added this: https://github.com/tomhodgins/deqaf/blob/master/index.js#L20&L28
Hopefully this new version takes care of this issue! :D
That did the trick. Thanks!
The issue is occuring on line 21 of index.js
Demo: https://codepen.io/tomhodgins/pen/aRWqro