Post AbY8dj2tcWnLrtGOAa by cody@misskey.codingneko.com
(DIR) More posts by cody@misskey.codingneko.com
(DIR) Post #AbY8dhBgWsdY6ZMNai by cody@misskey.codingneko.com
2023-11-06T23:18:24.567Z
1 likes, 0 repeats
:kekw::kekw::kekw::kekw::kekw:I just got Invidious to embed into YouTube itself when the adblocked piece of shit blocker thingamadude shows up. If you want it, I'll leave a pastebin with the userscript for Tampermonkey in a reply to this post.
(DIR) Post #AbY8di5hAdRKuHZ6tU by cody@misskey.codingneko.com
2023-11-06T23:21:54.903Z
0 likes, 0 repeats
Actually nevermind, pastebin is stupid and blocks it, here you go:// ==UserScript==// @name Invidious embed// @namespace http://codingneko.com// @version 0.1// @description Replaces youtube video player with an embed of Invidious.// @author CodingNeko// @match *://*.youtube.com/watch?v=*// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com// @grant none// ==/UserScript==(function() { 'use strict' let embedLink = 'https://yt.codingneko.com/embed/' + window.location.href.split('watch?v=')[1]; onElementLoad('ytd-enforcement-message-view-model').then(container => { container.innerHTML = ``; });})();function onElementLoad(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { observer.disconnect(); resolve(document.querySelector(selector)); } }); observer.observe(document.body, { childList: true, subtree: true }); });}</code></pre></p>
(DIR) Post #AbY8dj2tcWnLrtGOAa by cody@misskey.codingneko.com
2023-11-07T00:28:01.294Z
0 likes, 0 repeats
I feel stupid, this is horrible, but here you go, 2.0. now it updates when you change videos.// ==UserScript==// @name Invidious embed// @namespace http://codingneko.com// @version 0.2// @description Replaces youtube video player with an embed of Invidious.// @author CodingNeko// @match *://*.youtube.com/watch?v=*// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com// @grant none// ==/UserScript==(function() { 'use strict' onElementLoad('ytd-enforcement-message-view-model').then(replaceContainer); // This is stupid but I cant do it another way because YouTube obsucres it (potentially on purpose) let location = window.location.href; setInterval(() => { if (location != window.location.href) { location = window.location.href; onElementLoad('ytd-enforcement-message-view-model').then(replaceContainer); } }, 500);})();function replaceContainer(container) { if(container instanceof HTMLElement) { let embedLink = 'https://yt.codingneko.com/embed/' + window.location.href.split('watch?v=')[1].split('&')[0]; container.innerHTML = ``; }}function onElementLoad(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { observer.disconnect(); resolve(document.querySelector(selector)); } }); observer.observe(document.body, { childList: true, subtree: true }); });}</code></pre></p>
(DIR) Post #AbY8djpShxdwIVzArw by cody@misskey.codingneko.com
2023-11-07T01:17:26.630Z
0 likes, 0 repeats
Ok one more, not sure this works, but I think it should, it should autoplay the videos...// ==UserScript==// @name Invidious embed// @namespace http://codingneko.com// @version 0.2.1// @description Replaces youtube video player with an embed of Invidious.// @author CodingNeko// @match *://*.youtube.com/watch?v=*// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com// @grant none// ==/UserScript==(function() { 'use strict' onElementLoad('ytd-enforcement-message-view-model').then(replaceContainer); // This is stupid but I cant do it another way because YouTube obsucres it (potentially on purpose) let location = window.location.href; setInterval(() => { if (location != window.location.href) { location = window.location.href; onElementLoad('ytd-enforcement-message-view-model').then(replaceContainer); } }, 500);})();function replaceContainer(container) { if(container instanceof HTMLElement) { container.innerHTML = ''; let embedLink = 'https://yt.codingneko.com/embed/' + window.location.href.split('watch?v=')[1].split('&')[0] + '?autoplay=1&player_style=youtube&'; container.innerHTML = ``; }}function onElementLoad(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { observer.disconnect(); resolve(document.querySelector(selector)); } }); observer.observe(document.body, { childList: true, subtree: true }); });}</code></pre></p>
(DIR) Post #AbY8dkfZaDKKu8Mn5s by tux0r@layer8.space
2023-11-07T02:47:28Z
0 likes, 0 repeats
@cody Looks like it's truncated. That's sad, it seems like a valid alternative to Privacy Redirector.
(DIR) Post #AbYdEoXX9ZSCFPCA2C by cody@misskey.codingneko.com
2023-11-07T08:20:23.268Z
0 likes, 0 repeats
@tux0r@layer8.space wdym it's truncated? sorry, pepega brain JavaScript developer here :kekw:
(DIR) Post #AbYdEpalF3d5VhiFhg by tux0r@layer8.space
2023-11-07T08:30:20Z
0 likes, 0 repeats
@cody Typical JavaScript developer… :-)At least here, the end is missing.
(DIR) Post #AbYtZRswB28PKh4GMS by cody@misskey.codingneko.com
2023-11-07T10:40:05.047Z
0 likes, 0 repeats
@tux0r@layer8.space lol open it on my instance, it looks ok here...https://misskey.codingneko.com/notes/9lr7h2p24k
(DIR) Post #AbYtZSoMjW4WCnw7sG by tux0r@layer8.space
2023-11-07T11:33:20Z
0 likes, 0 repeats
@cody Ah, Mastodon vs. Misskey…
(DIR) Post #AbZ8W6UIm2znPiPKwC by cody@misskey.codingneko.com
2023-11-07T14:16:53.173Z
0 likes, 0 repeats
@tux0r@layer8.space Typical Mastodon user… :-)
(DIR) Post #AbZ8WAtGPBL74I7KOu by tux0r@layer8.space
2023-11-07T14:20:49Z
0 likes, 0 repeats
@cody :(