Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
Hi,
I would like to write a script that makes video links opened from the Youtube subscriptions page open in a new tab instead of the current, but I'm quite a noob at writing code.
Anyone able to give a helping hand please ?
Without writing it for you, here's a general approach to it:
document.getElementsByTagName('a'));
Ooh, learned something new. If works for you, it's as simple appending a to
var base=document.createElement('base'); base.target='_blank'; document.head.appendChild(base);
Thanks for trying to help XFoxPrower,
unfortunately it looks like Youtube does something to disallow links from opening in a new tab.
I already had this script, which AFAIK should work for clicking thumbnails & video titles on the subscription page, I even saw the target='_blank' being added to the specific elements, but it somehow doesn't get picked up upon clicking any of them.
var Alink = document.getElementsByClassName('yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 spf-link '); for (var i = Alink.length - 1; i > -1; i--) { Alink[i].setAttribute("target", "_blank"); }