'How can I programmatically change any webpage's elements' CSS while bypassing Content Security Policy?
I'm writing an electron app that allows to change DOM-content of the webpage programmatically. For that I wrote a script that listens for some keyboard / native button events and applies different CSS styles to the elements.
Sadly, on some webpages it isn't working at all, because me trying to inject my script into page's HTML violates their Content Security Policy.
I understand the importance of CSP and that there is no way for my script to bypass it, so is there any other way to programmatically interact with the page's DOM, if I only want to listen for external events and apply CSS styles? I mean, I don't want to add/remove new elements to DOM, which is the main vulnerability CSP is protecting us from. If only changing the CSS cannot be used to do harm, there must be a way to perform that without violating CSP?..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

