Commit Graph

16 Commits

Author SHA1 Message Date
toofar d4a7619f9c userscripts: run view_in_mpv jseval in main world
1. run jseval in main world: the script adds an element that calls the
   `restore_video` function. This was failing with a "not found" message
   on webengine, presumably because the dom click handler runs in the
   main world and the function was over in the jseval world. The the
   script predates webengine which is the backend that implements the
   worlds.
2. remove a console log message, seems to be just noise and easy enough
   to add back later
3. remove href attribute of the restore video link: this seemed to be
   causing the `restore_video` method to be called twice. The second
   time with `this` as the global Window object, which was causing an
   error because that has a null `parentNode` attribute.
4. added the `cursor: pointer` style that was needed since the element
   didn't have an href anymore
5. change the mpv flags `--terminal` -> `--quiet`. This means we get
   error messages (eg from yt-dlp) in error logs and in the `:process`
   page now. It can get a bit spammy though if you are running from a
   terminal. I'm getting a log of keepalive warning and error logs from
   ffmpeg. On the other hand it's really annoying to see a "process
   failed, see :process for details" and having no error messages in
   there.

Fixes: #7838
2023-08-20 10:57:14 +12:00
Florian Bruhin 7961cf7355 RIP Freenode 2021-05-26 09:34:37 +02:00
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 5635639ed4 view-in-mpv: Remove --yes-playlist argument for youtube-dl
Reverts #3057
Fixes #3977
2018-06-06 09:59:03 +02:00
François Chavant dd589f180b Fix remaining shellcheck warnings 2017-12-02 21:09:24 +01:00
jnphilipp f1b53cdbdc Update view_in_mpv 2017-10-07 23:10:48 +02:00
jnphilipp e0c76fcb4f Support playlist in mpv userscript. 2017-10-05 09:42:47 +02:00
Kevin Velghe 0f07198271 Don't pass 2 arguments to shebang
On most platforms (according to shellcheck), you can't pass two
arguments in a shebang. I.e. on Debian you get:
/usr/bin/env: ‘bash -e’: No such file or directory
2016-07-26 11:48:26 +02:00
Florian Bruhin dfbd31f35f Use /usr/bin/env shebang for bash userscripts
See #1665
2016-07-20 11:06:35 +02:00
Florian Bruhin 1e55db0630 Follow the American way(tm) of spelling things 2016-05-29 10:57:41 +02:00
Florian Bruhin fe16b95f00 Fix typo. 2015-09-16 21:29:03 +02:00
Thorsten Wißmann bbdec1779a Add check that view_in_mpv is run as a userscript
Also fix another typo.
2015-09-03 18:02:22 +02:00
Thorsten Wißmann de5cdf6f0f Also hide <embed> tags
But only hide those tags that aren't children (or descendants) of other
tags that get replaced anyway. That is needed because sometimes, flash
videos are in <embed> tags, sometimgs in <object> tags and sometimes in
<embed> tags within <object> tags.

Furthermore enforce our "click here" link to have transparent background
(and in future: remove as many properties from website specific CSS
stylesheets).
2015-09-03 16:34:30 +02:00
Thorsten Wißmann e5b7fdb565 Fix typos spotted by The-Compiler 2015-09-02 17:20:51 +02:00
Thorsten Wißmann 197feade32 Also replace flash videos
This means: also replace <object> tags and put the replacement message
even higher in the z-order. (Latter had to be done to make it the
replacement visible on espn _dot_ com)
2015-09-02 17:18:44 +02:00
Thorsten Wißmann fe6a6c33ae Add view_in_mpv userscript 2015-09-02 15:59:52 +02:00