Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Iconos
- // @description Un saludo a Enrique y a Yasinator
- // @namespace Violentmonkey Scripts
- // @grant none
- // @include https://www.3djuegos.com/*
- // @version 1.1
- // @author Señor X
- // ==/UserScript==
- if (window.location.href.indexOf("zona=escribir") > -1) {
- var body = document.getElementById("body");
- var caja = document.createElement("div");
- caja.id = "iconitos";
- caja.style.backgroundSize = "20px 20px";
- caja.style.backgroundPosition = "center center";
- caja.style.backgroundColor = "#37bed021";
- caja.style.height = "auto";
- caja.style.width = "419px";
- caja.style.position = "fixed";
- caja.style.top = "140px";
- caja.style.padding = "45px";
- caja.style.zIndex = "9";
- caja.style.opacity = "0";
- caja.style.transition = "opacity 1s";
- body.appendChild(caja);
- var iconos = ["http://www.roto2.com/roto2.gif",
- "https://iforo.3djuegos.com/files_foros/fo/fo5f.gif",
- "http://st.forocoches.com/foro/images/smilies/roto2qtemeto.gif",
- "http://st.forocoches.com/foro/images/smilies/roto2nuse.gif",
- "http://st.forocoches.com/foro/images/smilies/roto2cafe.gif",
- "http://st.forocoches.com/foro/images/smilies/roto2gaydude.gif",
- "https://st.forocoches.com/foro/images/smilies/roto2rie.gif",
- "http://st.forocoches.com/foro/images/smilies/sisi1.gif",
- "https://st.forocoches.com/foro/images/smilies/meparto.gif",
- "http://st.forocoches.com/foro/images/smilies/thumbsup.gif",
- "https://st.forocoches.com/foro/images/smilies/smash2.gif",
- "http://st.forocoches.com/foro/images/smilies/icon_popcorn.gif",
- "https://iforo.3djuegos.com/files_foros/fo/fo5d.gif",
- "http://st.forocoches.com/foro/images/smilies/clap.gif",
- "http://st.forocoches.com/foro/images/smilies/dancer2.gif",
- "http://st.forocoches.com/foro/images/smilies/buitre.gif",
- "http://st.forocoches.com/foro/images/smilies/facepalm.gif",
- "http://i.neoseeker.com/cm/52/badges/pc_master_race_iconZdVbe.png",
- "http://1.bp.blogspot.com/_wICwAy4q81U/TROgTWCqiRI/AAAAAAAAAiA/6Xt_ZSrbVh0/s320/aplausos.gif",
- "http://i.imgur.com/f9IXpQY.gif",
- "http://i.imgur.com/lzTeK36.gif",
- "http://i.imgur.com/Xes98hi.png",
- "http://i.imgur.com/nluUNx4.png",
- "http://cdn.arstechnica.net/wp-content/uploads/2015/11/kappa.png",
- "http://a.deviantart.net/avatars/p/e/pedobear45.gif",
- "http://iforo.3djuegos.com/files_foros/7x/7xo.png",
- "http://iforo.3djuegos.com/files_foros/5h/5he.png",
- "https://i.ibb.co/470nQvb/eleven.png",
- "https://i.ibb.co/xGRBW4k/tonto.png",
- "https://i.ibb.co/B37WZSD/3x-1.gif",
- "https://i.ibb.co/ckGM6mJ/3x-2.gif",
- "https://i.ibb.co/2qLwZwd/3x-3.gif",
- "https://i.ibb.co/pKxmP5h/3x-4.gif",
- "https://i.ibb.co/FDsJ3JZ/3x-5.gif",
- "https://i.ibb.co/FHc25mS/3x-6.gif",
- "https://i.ibb.co/64gWJfH/3x-7.gif",
- "https://i.ibb.co/KWcgx18/3x-8.gif",
- "https://i.ibb.co/44wPZt5/3x-9.gif",
- "https://i.ibb.co/2n534xD/3x-10.gif",
- "https://i.ibb.co/kJrw3qG/3x-11.gif",
- "https://i.ibb.co/KqxqLDb/3x.gif",
- "https://i.ibb.co/4PwhzcV/3x.gif",
- "https://i.ibb.co/bWJvJYY/3x-1.gif",
- "https://i.ibb.co/BqdHJWP/3x-2.gif",
- "https://i.ibb.co/0Z6Gz09/3x-3.gif",
- "https://i.ibb.co/s1cRCwD/3x-4.gif",
- "https://i.ibb.co/txYHCTp/3x-5.gif"
- ];
- var memes = ["https://i.imgur.com/Vi5Qn1L.jpg",
- "https://ep01.epimg.net/verne/imagenes/2020/02/12/articulo/1581533769_341780_1581537731_noticia_normal.jpg",
- "https://i.gyazo.com/690136c1572cd1f75e27ec72467faf14.png",
- "https://pbs.twimg.com/media/D43XT_dWwAE1Ac6.jpg",
- "https://pbs.twimg.com/media/DuVXrgQW4AEncml.jpg",
- "https://archive-media-1.nyafuu.org/vp/image/1515/99/1515999450920.gif",
- "https://www.pngitem.com/pimgs/m/296-2965180_wojak-sony-playstation-4-hd-png-download.png",
- "https://i.pinimg.com/564x/82/18/c9/8218c9217e082234f55c665551748d4c.jpg",
- "https://thumbs.gfycat.com/ImpeccableDiscreteHyrax-max-1mb.gif",
- "https://i.ytimg.com/vi/jc-svpCUbuc/maxresdefault.jpg",
- "https://www.dailydot.com/wp-content/uploads/1b8/c9/f28d88cc84be32b4.png",
- "https://memegenerator.net/img/instances/56768701/one-ticket-to-hell-plase.jpg",
- "https://media1.tenor.com/images/bac206f4886b9d65d73eb803ba646e25/tenor.gif",
- "https://media.tenor.com/images/f18b31a91406dac22baa1d47c6752096/tenor.gif",
- "https://media1.tenor.com/images/7a6505ea7790cde4b0003a9c4b0ea57b/tenor.gif",
- "https://media1.tenor.com/images/8c182d284869ea4d589f09ecad3f9abd/tenor.gif",
- "https://media1.tenor.com/images/7f4acc4cb1fc88ea4426dcf1ad1ec27f/tenor.gif",
- "https://media1.tenor.com/images/07d99c397f19a807439e313f5ce523a8/tenor.gif"];
- var icons = document.getElementById("iconitos");
- /*Crear títols */
- var titulo_iconos = document.createElement("h2");
- titulo_iconos.style.color = "white";
- titulo_iconos.style.fontSize = "20px";
- titulo_iconos.style.marginLeft = "3px";
- var text_iconos = document.createTextNode("Iconos");
- var titulo_memes = document.createElement("h2");
- titulo_memes.style.color = "white";
- titulo_memes.style.fontSize = "20px";
- titulo_memes.style.marginLeft = "3px";
- titulo_memes.style.marginTop = "10px";
- var text_memes = document.createTextNode("Memes");
- /*Crear títols */
- titulo_iconos.appendChild(text_iconos);
- icons.appendChild(titulo_iconos);
- for(i=0;i<iconos.length;i++){
- var temp = iconos[i];
- var newicon = document.createElement("div");
- newicon.className = "dib cur_p bbcode_boton";
- newicon.id = i;
- newicon.style.backgroundImage = "url('"+iconos[i]+"')";
- newicon.style.backgroundRepeat = "no-repeat";
- newicon.style.backgroundSize = "contain";
- newicon.style.backgroundPosition = "center center";
- newicon.style.height = "30px";
- newicon.style.width = "30px";
- newicon.style.border = "1px solid #676464";
- newicon.style.margin = "3px";
- newicon.addEventListener("click",function(){add_icon(this.id)}, true);
- icons.appendChild(newicon);
- }
- titulo_memes.appendChild(text_memes);
- icons.appendChild(titulo_memes);
- for(i=0;i<memes.length;i++){
- var temp = memes[i];
- var newicon = document.createElement("div");
- newicon.className = "dib cur_p bbcode_boton";
- newicon.id = i;
- newicon.style.backgroundImage = "url('"+memes[i]+"')";
- newicon.style.backgroundRepeat = "no-repeat";
- newicon.style.backgroundSize = "contain";
- newicon.style.backgroundPosition = "center center";
- newicon.style.height = "60px";
- newicon.style.width = "60px";
- newicon.style.border = "1px solid #676464";
- newicon.style.margin = "3px";
- newicon.addEventListener("click",function(){add_meme(this.id)}, true);
- icons.appendChild(newicon);
- }
- function add_icon(id){
- var caretPos = document.getElementById("form_mensaje").selectionStart;
- var textAreaTxt = document.getElementById("form_mensaje").value;
- var txtToAdd = "[img]"+iconos[id]+"[/img]";
- document.getElementById("form_mensaje").value = textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos);
- }
- function add_meme(id){
- var caretPos = document.getElementById("form_mensaje").selectionStart;
- var textAreaTxt = document.getElementById("form_mensaje").value;
- var txtToAdd = "[img]"+memes[id]+"[/img]";
- document.getElementById("form_mensaje").value = textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos);
- }
- var barra = document.getElementsByClassName("comu_caja_fondo_boton br4 mar_rl5 mar_t10 tar pr")[0];
- var barra2 = barra.innerHTML;
- barra.innerHTML = '<a class="boton b_s14" id="boton_iconos" style="margin-left: 10px; float: left" href="#">Iconos</a>';
- barra.innerHTML += barra2;
- document.getElementById("boton_iconos").addEventListener("click",function(){
- var caja = document.getElementById("iconitos");
- if (caja.style.opacity === "0") {
- caja.style.opacity = "1";
- }
- else {
- caja.style.opacity = "0";
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement