Created
June 20, 2020 17:22
-
-
Save joelmiguelvalente/045c748ddf8d5c6ee90adc02459a0fb8 to your computer and use it in GitHub Desktop.
Agregar al final del archivo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('#generar_post').on('click', function(e){ | |
$('#generator').slideToggle(); | |
$(this).attr('value', 'Haz Clic Aqui para Agregar el Código a tu Post') | |
.addClass('btnGreen'). | |
attr('onclick', 'hxywg()'); | |
}); | |
}); | |
function hxywg() { | |
var txt = ""; | |
document.getElementById("markItUp").value = ""; | |
if (document.getElementById("titulo").value != ""){ | |
txt = "[color=#244061][size=18]"; | |
txt += document.getElementById("titulo").value; | |
txt += "[/size][/color]\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("portada").value != ""){ | |
txt = ""; | |
txt += "[align=center][img="; | |
txt += document.getElementById("portada").value; | |
txt += "][/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("youtube").value != ""){ | |
txt = ""; | |
txt += "[align=center][swf=http://www.youtube.com/v/"; | |
txt += document.getElementById("youtube").value; | |
txt += "][/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("info").value != ""){ | |
txt = ""; | |
txt += "[color=#3F3F3F]]\n"; | |
txt += document.getElementById("info").value; | |
txt += "[/color]\n\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("ss1").value != ""){ | |
txt = ""; | |
txt += "[align=center][img="; | |
txt += document.getElementById("ss1").value; | |
txt += "][/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("ss2").value != ""){ | |
txt = ""; | |
txt += "\n"; | |
txt += "[align=center][img="; | |
txt += document.getElementById("ss2").value; | |
txt += "][/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("ss3").value != ""){ | |
txt = ""; | |
txt += "\n"; | |
txt += "[align=center][img="; | |
txt += document.getElementById("ss3").value; | |
txt += "][/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("downlinks").value != ""){ | |
txt = ""; | |
txt += "[align=center]"; | |
txt += document.getElementById("downlinks").value; | |
txt += "[/align]"; | |
document.getElementById("markItUp").value += txt;} | |
if (document.getElementById("pass").value != ""){ | |
txt = ""; | |
txt += document.getElementById("pass").value; | |
txt += "[/align]\n\n"; | |
document.getElementById("markItUp").value += txt;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment