[qutebrowser] wordfilter userscript with sed: local file fails to load.

Florian Bruhin me at the-compiler.org
Wed Nov 2 08:34:51 CET 2016


* william tonks <exo660 at gmail.com> [2016-11-01 21:37:28 -0700]:
> i'm trying to download the current page, filter words, and then open the
> edited page in the current tab.
> where it fails is on the third step, this is the error message:
> 
> Unable to load pageError while opening
> file://home/william/qutetemp/newfile:
> 
> Request for opening non-local file file://home/william/qutetemp/newfile
> 
> 
> but i don't understand why it says it's a non local file; it's definitely
> on my drive. could it be the "file://"?

I don't understand the error either (it's coming from QtWebKit) :D

Try doing file:///home/... though, otherwise I think that'd be a
relative path.

> but when i run it as "/home/william/qutetemp/newfile" it tries to download
> the file.

Try adding a .html extension - unfortunately QtWebKit doesn't do
content sniffing.

> and when/if this works how do i run it? i intend to have it run on every
> page load but i'm not sure how to accomplish that.

That's not possible yet. It might be with autocmds once I get to
reviving this PR (which was deferred until after the QtWebEngine stuff
is done): https://github.com/The-Compiler/qutebrowser/pull/1155

However, I don't think userscripts are the right fit for this, you'll
likely run into more issues.

Once autocmds are in, you could run some javascript via :jseval which
does the replacements you want, or you wait for the plugin API and
write a plugin doing that.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/qutebrowser/attachments/20161102/21eeec49/attachment.asc>


More information about the qutebrowser mailing list