🏠 Home 

SC: un-gate outgoing links

make outgoing links into direct links.


Installer dette script?
// ==UserScript==
// @name        SC: un-gate outgoing links
// @namespace   Violentmonkey Scripts
// @match       *://soundcloud.com/*
// @grant       none
// @version     0.1.5
// @license     GPLv3
// @author      -
// @description make outgoing links into direct links.
// ==/UserScript==
(function() { /////////////////
function process(a) {
console.log(a);
a.classList.add('ungate-processed');
if (a.href.includes('https://gate.sc', 0)) {
var newurl = /https:\/\/gate.sc\/\?url=(.*)&token/.exec(a.href)[1];
a.href = decodeURIComponent(newurl);
a.setAttribute('rel', 'noopener noreferrer');
}
}
const observer = new MutationObserver(() => {
document.querySelectorAll('a:not(.ungate-processed)').forEach(a => process(a) );
});
observer.observe(document.body, { childList: true, subtree: true });
})();  ///////////////