1

While using some websites, I often use a language bar bookmarklet to type strange unicode symbols to show BQN code.

When i click the bookmarklet on the discord web app, the following error shows up in the Mozilla Firefox DevTools console.

enter image description here

This is the bookmarklet's internal code.

I think there may be a way to modify the script to work on discord, but my google searches have given no results.

Is there a way to prevent a site from doing this blocking via settings, or additional plugins?

Razetime
  • 1,072

1 Answers1

1

Is there a way to prevent a site from doing this blocking via settings, or additional plugins?

Per an answer to this Stack Overflow question, it is possible to disable Content Security Policy browser-wide in Firefox by setting about:configsecurity.csp.enable to false:

Content Security Policy Settings - Firefox 89.0.1 - Screenshot

This setting was confirmed to still be available as of Firefox 89.0.1 (June 2021).

As that answer notes, however, this is exceptionally dangerous for general web browsing.

Other options could (possibly) include:

  • Filtering incoming response headers via an HTTP proxy (as an incoming response header from the server is how the browser knows to follow a given policy).

  • Using some plugin or extension (as you suggest), though there seems to be debate on whether or not this would actually work.

  • Running your script as a TamperMonkey/GreaseMonkey userscript as suggested in response to this Super User question.

Anaksunaman
  • 18,227