YT2Invidio

Point YouTube links to Invidious, Twitter to Nitter, Instagram to Bibliogram, Reddit to Teddit, Medium to Scribe

< 脚本YT2Invidio的反馈

提问/评论

§
发表于:2020-01-31

Support replacing Youtube and Twitter Embeds with Invidious and Nitter

It would be nice if it could do that.

IzzySoft作者
§
发表于:2020-01-31

Maybe. What link should be converted into which? If you can give me both, I can take a look.

§
发表于:2020-01-31

Actually, there's no embed support for Nitter (as of now). For Youtube, it should be youtube.com/embed/ to invidio.us/embed/

IzzySoft作者
§
发表于:2020-01-31

Thanks for the URL elements. I've just found an example page with an embedded video. As you might have guessed, those are not "links" but "iframes". And now comes the deal-breaker: as those iFrames are XS (Cross-Site), I was not able to grab the link from within Greasemonkey. I might have missed a trick unknown to me – so if you happen to know, please tell me; but it seems I'm unable to grant your wish, as much as I'd like to.

§
发表于:2020-01-31

Youtube to Invidious used to work (its a script that is on this site).

IzzySoft作者
§
发表于:2020-01-31

That would probably be this script then. I'd rather avoid using MutationObserver (AFAIK it's quite resource hungry). I'll let that sit as a note here, though; when I come upon a page with an embedded video again and have some time, I'll check. At the moment, both conditions are not met (have no such page, and not the time to play with it), sorry. But it's not forgotten.

IzzySoft作者
§
发表于:2020-02-03

I don't see any YT frame there.

IzzySoft作者
§
发表于:2020-02-04

Thanks!

Note to self: document.getElementsByTagName('iframe')[4].attributes[3].value seems to get the embed URL on that page (https://www.youtube.com/embed/A0rEk6AK1I0). Need to try if we can do that without MutationObserver, by just walking the frames.

§
发表于:2020-04-16

@IzzySoft said: Thanks!

Note to self: document.getElementsByTagName('iframe')[4].attributes[3].value seems to get the embed URL on that page (https://www.youtube.com/embed/A0rEk6AK1I0). Need to try if we can do that without MutationObserver, by just walking the frames.

You can check this Out: https://greasyfork.org/en/scripts/394841-youtube-to-invidio-us-embed. This does work.

If you have time you can also possibly integrate auto-dash (https://greasyfork.org/en/users/322108-cylgom) but make it so that it works well with embed video if you add support to it and 1080p support to.(https://greasyfork.org/en/scripts/394627-1080p-for-invidio-us)

IzzySoft作者
§
发表于:2020-04-16

Thanks, @Beastmaster – done! Except for auto-dash (I don't want to setup mutation observers).

发表回复

登录以发表回复。