// ==UserScript== // @name Rock Paper Shotgun [RPS] & Eurogamer embed fix // @version 2 // @description Enable embedded third party content on RPS & Eurogamer despite having rejected cookies // @author Tim Smith // @license GPL-3.0 License // @namespace https://greasyfork.org/users/945293 // @match *://www.rockpapershotgun.com/* // @match *://www.eurogamer.net/* // @downloadURL none // ==/UserScript== (function() { const sources = [ 'bandcamp.com', 'gfycat.com', 'giphy.com', 'libsyn.com', 'megaphone.fm', 'redditmedia.com', 'soundcloud.com', 'twitch.tv', 'youtube' ]; const selectors = sources.map(source => 'iframe[data-src*="'+source+'"]'); document.querySelectorAll(selectors.join()).forEach(iFrame => { iFrame.src = iFrame.dataset.src; }); if (document.querySelector('blockquote.twitter-tweet') !== null) { const widgetScript = document.createElement('script'); widgetScript.async = true; widgetScript.src = 'https://platform.twitter.com/widgets.js'; widgetScript.charset = 'utf-8'; document.head.appendChild(widgetScript); } document.querySelectorAll('script[data-src*="sdk.apester.com"]').forEach(script => { script.src = script.dataset.src; }); })();