Greasy Fork is available in English.

Youtube Logo - Link to subscriptions feed

Change YouTube logo link to user's subscription feed instead of homepage, when logged in, for 2017 and later YouTube layout.

< Feedback on Youtube Logo - Link to subscriptions feed

Review: Good - script works

§
Posted: 11.11.2015

Updated 11th November 2015

YouTube updates broke script again. Fixed.

§
Posted: 12.11.2015

Now rewritten to work with AJAX page updates and all top TLDs

§
Posted: 13.11.2015

Greetings friend, I also have a script like this [made it myself, it is not posted on greasyfork though] and I just realized that my script broke because whenever I click a link now the entire page doesn't reload anymore [yeah AJAX page changes] I just wanted to know how you managed to fix that. Your code looks very different from mine, and my code looks very noob-ish compared to yours, but I assume its that addEventListener('DOMNodeInserted') part of your code that listens for page changes.
I hope you reply :D.

§
Posted: 24.11.2015
Greetings friend, I also have a script like this [made it myself, it is not posted on greasyfork though] and I just realized that my script broke because whenever I click a link now the entire page doesn't reload anymore [yeah AJAX page changes] I just wanted to know how you managed to fix that. Your code looks very different from mine, and my code looks very noob-ish compared to yours, but I assume its that addEventListener('DOMNodeInserted') part of your code that listens for page changes.
I hope you reply :D.

Sorry for late reply.

Yes you are correct the addEventListener('DOMNodeInserted') is triggered every time an element changes, this was implemented due to AJAX no longer triggering the original script - just like you said!

I am not a userscript pro, and it is my understanding that using addEventListener('DOMNodeInserted') is not the most efficient method due to being triggered so many times, but I had no better idea! If you find another method please let me know.

The previous version of the script (based off' the original by tolanri @ http://userscripts-mirror.org/users/518143) is here: https://greasyfork.org/en/scripts/13582-youtube-logo-link-to-subscriptions-feed/code?version=86157

§
Posted: 24.11.2015

Hello again Ranie.

After more research I have updated the script to use the following handlers which are only triggered 1-2 times per page load:
document.addEventListener('readystatechange', runScript);
document.addEventListener('spfdone', runScript);

Please see: https://greasyfork.org/en/scripts/13582-youtube-logo-link-to-subscriptions-feed/code?version=89334

Regards :)

Post reply

Sign in to post a reply.