Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var iframe = document.createElement( 'iframe' );
- var input = document.createElement( 'input' );
- input.type = "text"; input.placeholder = "podaj kod filmiku czyli to co jest w linku po 'watch?v=' "; input.style.width = "60%";
- var input_ok = document.createElement( 'button' );
- input_ok.innerHTML = "gotowe"; input_ok.style.color = "black";
- document.body.prepend( input_ok ); document.body.prepend( input );
- input_ok.onclick = function(){
- document.body.removeChild( input ); document.body.removeChild( input_ok );
- iframe.src = "https://www.youtube.com/embed/" + input.value;
- var space = document.body.getElementsByTagName( 'div' );
- space[1].className = "";
- var mid = document.getElementsByClassName( "col-sm-10 col-md-8 mid midfull" );
- mid[0].style.zIndex = "1"; mid[0].style.backgroundColor = "rgba(0,0,0,0.5)";
- document.body.prepend( iframe );
- iframe.style.position = "absolute"; iframe.style.zIndex = "99"; iframe.style.width = "98%"; iframe.style.height = "85%"; iframe.style.top = "15%";
- var buttons = document.createElement( 'div' );
- var button = document.createElement( 'button' );
- button.innerHTML = "H I D E";
- buttons.style.position = "absolute"; buttons.style.top = "3%"; buttons.style.zIndex = "99999"; button.style.color = "black";
- var chatButton = document.createElement( 'button' );
- chatButton.style.color = "black"; chatButton.innerHTML = "color";
- document.body.prepend( buttons );
- buttons.appendChild( button );
- buttons.appendChild( chatButton );
- button.onclick = function(){
- if(iframe.style.position == "absolute"){
- iframe.style.position = "fixed"; iframe.style.zIndex = "-1"; button.innerHTML = "S H O W";
- } else {
- iframe.style.position = "absolute"; iframe.style.zIndex = "99"; button.innerHTML = "H I D E";
- };
- };
- var chat = document.getElementsByClassName( "chat" );
- chatButton.onclick = function(){
- if(chatButton.style.color == "red"){
- chat[0].style.textShadow = "1px 2px blue";
- chatButton.style.color = "blue";
- } else if(chatButton.style.color == "blue"){
- chat[0].style.textShadow = "1px 2px green";
- chatButton.style.color = "green";
- } else if(chatButton.style.color == "green"){
- chat[0].style.textShadow = "";
- chatButton.style.color = "black";
- } else {
- chat[0].style.textShadow = "1px 2px red";
- chatButton.style.color = "red";
- };
- };
- };
Add Comment
Please, Sign In to add comment