Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 1.73 KB | Hits: 77 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. <style>
  2. body{
  3.         background-color:#5b8db9;
  4.         padding:20px;
  5.         font-family:Tahoma, Geneva, sans-serif;
  6.         font-size:13px;
  7.         color:#0a426d;
  8. }
  9. .input{
  10.          background-color:#a5d6ed;
  11.          font-weight:bold;
  12.          text-align:center;
  13.          font-size:13px;
  14.          border:1px solid #486d90;
  15.          color:#0a426d;
  16.     -moz-border-radius:8px;    
  17. }
  18. img{
  19.          border:3px solid #486d90;
  20.          color:#0a426d;
  21. }
  22. a{
  23.          color:#0a426d;
  24.          font-weight:bold;     
  25. }
  26. </style>
  27. <div align="center">
  28. <h2>TuentiZoom 1.0 | By Pasku</h2>
  29. <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>
  30.         <script>
  31.                
  32.                 function funcion(url_foto){
  33.                         if (url_foto == ""){
  34.                                 alert('Por favor escribe la URL de la imagen principal.');
  35.                         }
  36.                         else if (url_foto.indexOf('perfiles') == -1 && url_foto.indexOf('thumbs') == -1){
  37.                                 alert('URL invalida.');
  38.                         }
  39.                         else{
  40.                                 url_foto = url_foto.replace("http://","");
  41.                                 separar = url_foto.split('/');
  42.                                
  43.                                 if (separar[8] != undefined){
  44.                                         //removeElement(document.getElementById('contenido'));
  45.                                         imagen = "http://imagenes0.tuenti.net"+"/"+separar[2]+"/"+separar[3]+"/"+separar[4]+"/"+"600"+"/"+separar[6]+"/"+separar[7]+"/"+separar[8];
  46.  
  47.                                         document.write("<a href='"+imagen+"'><img src='"+imagen+"' border='0' /></a><br><br>");
  48.  
  49.                                         document.write("<input type='text' name='url_final' class='input' value='"+imagen+"' size='75'><br><br>");
  50.                                         document.write('<a href="javascript:location.reload();">Ver otra foto</a>');
  51.                                 }
  52.                                 else{
  53.                                         alert('URL invalida.');
  54.                                 }
  55.                         }
  56.                 }
  57.  
  58.                 function removeElement(elemento){
  59.                         elemento.parentNode.removeChild(elemento);
  60.                 }
  61.         </script>
  62. </div>