Untitled
By: a guest | Mar 20th, 2010 | Syntax:
None | Size: 1.73 KB | Hits: 77 | Expires: Never
<style>
body{
background-color:#5b8db9;
padding:20px;
font-family:Tahoma, Geneva, sans-serif;
font-size:13px;
color:#0a426d;
}
.input{
background-color:#a5d6ed;
font-weight:bold;
text-align:center;
font-size:13px;
border:1px solid #486d90;
color:#0a426d;
-moz-border-radius:8px;
}
img{
border:3px solid #486d90;
color:#0a426d;
}
a{
color:#0a426d;
font-weight:bold;
}
</style>
<div align="center">
<h2>TuentiZoom 1.0 | By Pasku</h2>
<form id="contenido"><input id="input_url_foto" type="text" name="input_url_foto" class="input" size="75"><button onclick="funcion(document.getElementById('input_url_foto').value)">Aceptar</button></form>
<script>
function funcion(url_foto){
if (url_foto == ""){
alert('Por favor escribe la URL de la imagen principal.');
}
else if (url_foto.indexOf('perfiles') == -1 && url_foto.indexOf('thumbs') == -1){
alert('URL invalida.');
}
else{
url_foto = url_foto.replace("http://","");
separar = url_foto.split('/');
if (separar[8] != undefined){
//removeElement(document.getElementById('contenido'));
imagen = "http://imagenes0.tuenti.net"+"/"+separar[2]+"/"+separar[3]+"/"+separar[4]+"/"+"600"+"/"+separar[6]+"/"+separar[7]+"/"+separar[8];
document.write("<a href='"+imagen+"'><img src='"+imagen+"' border='0' /></a><br><br>");
document.write("<input type='text' name='url_final' class='input' value='"+imagen+"' size='75'><br><br>");
document.write('<a href="javascript:location.reload();">Ver otra foto</a>');
}
else{
alert('URL invalida.');
}
}
}
function removeElement(elemento){
elemento.parentNode.removeChild(elemento);
}
</script>
</div>