glacambre/firenvim

Website CSP prevents evaluating code in page

Closed this issue · 5 comments

zbyna commented
  • OS Version: Linux x86-64 4.8.17-040817-generic, KDE SC 4.13.2

  • Browser Version: Firefox 83 (64bit)

  • Browser Addon Version: 0.1.32

  • Neovim Plugin Version: 0.1.32

  • What I tried to do:

  • What happened:

    • For the first time text fields can not be focused and edited, the second attempt (after page reloading) allows editing but without firenvim's features.
    • I have tried clean Firefox profile with only firenvim installed.
    • Other sites works well.

This happens because the site's CSP prevents evaluating code in the page. There's nothing I can do unfortunately :/. You can permanently disable firenvim on this website with the following configuration:

let g:firenvim_config = {
  \ 'localSettings': {
    \ 'https?://hosted\.weblate\.org': {
      \ 'takeover': 'never'
    \ }
  \ }
\ }
zbyna commented

Thanks for explanation. Creator of weblate.org does not care about nvim embedding see: WeblateOrg/weblate#4963 (comment)

How does this relate to #145?

@alerque It falls in the same category as #145 but while #145 will be fixed by the patch I sent to Mozilla, #811 won't.

@zbyna I'll re-open this issue, maybe one day I'll find the time to write a firefox patch to fix this :)

It took a lot of effort but I managed to fix this on master. The fix will reach you once I publish a new release :)