Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Jućubi
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description faking jućub
- // @author shategabri
- // @match https://blog.b92.net/text/*
- // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
- // @grant all
- // ==/UserScript==
- var jutjubi = document.evaluate( './/object[@type="application/x-shockwave-flash"]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
- for ( var i = 0; i < jutjubi.snapshotLength; ++i ) {
- var tjub = jutjubi.snapshotItem( i );
- tjub.id = "jt-" + i;
- var youtube = tjub.data;
- youtube = youtube.replace("/v/", "/embed/");
- youtube = youtube.replace("http", "https");
- youtube = youtube.replace(/&.*/,"")
- var iframe = document.createElement( "iframe" );
- iframe.setAttribute( "allowfullscreen", "" );
- iframe.setAttribute("width", "500");
- iframe.setAttribute( "allowfullscreen", "" );
- iframe.setAttribute("height", "380");
- iframe.setAttribute( "frameborder", "0" );
- iframe.setAttribute("allow", '"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture');
- iframe.setAttribute( "src", youtube);
- var oldtube = document.getElementById("jt-" + i);
- oldtube.parentNode.replaceChild(iframe, oldtube);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement