quoid / userscripts

An open-source userscript manager for Safari
https://quoid.github.io/userscripts/
GNU General Public License v3.0
3.19k stars 179 forks source link

GM.addElement support #627

Open UtterDonkey opened 7 months ago

UtterDonkey commented 7 months ago

Could the GM.addElement API be added which would allow elements such as script elements to be added into the page bypassing CSP?

ACTCD commented 7 months ago

Referring to #106, there currently seems to be no feasible way to bypass the severely restricted CSP in Safari.

UtterDonkey commented 7 months ago

Isn't it done in the iOS version of tampermonkey?

ACTCD commented 7 months ago

Have you actually tested this on your own?

We don't have access to the extension, and it's not open source, so we don't know in what way it bypasses CSP if it's implemented.

If you know, new knowledge is always welcome.

UtterDonkey commented 7 months ago

Would the way it bypasses CSP in safari be different from how it does it in other browsers?

ACTCD commented 7 months ago

Yes, it's not the same, the relevant APIs are lacking in Safari and have tighter restrictions.