Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/03/2013, 12:02
Avatar de memoadian
memoadian
Colaborador
 
Fecha de Ingreso: junio-2009
Ubicación: <?php echo 'México'?>
Mensajes: 3.696
Antigüedad: 14 años, 10 meses
Puntos: 641
Respuesta: ¿ Extensión en chrome para visualizar tamaño ventana navegador en tiempo r

pues convertitlo en extensión de chrome se puede pero quien sabe como.

yo lo que hice fue esto:
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="es">
  3.  
  4.   <!--======== Basic Page Needs =========-->
  5.  
  6.   <title>Medidas de pantalla</title>
  7.   <meta charset="utf-8">
  8.  
  9.   <style type="text/css">
  10.     body, html{
  11.       padding:0;
  12.       margin:0;
  13.       height:100%;
  14.     }
  15.   </style>
  16.  
  17.   <!--======== Scripts =========-->
  18.  
  19. <script type="text/javascript">
  20.   function TamVentana() {
  21.     var Tamanyo = [0, 0];
  22.     if (typeof window.innerWidth != 'undefined'){
  23.       Tamanyo = [
  24.           window.innerWidth,
  25.           window.innerHeight
  26.       ];
  27.     }else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){
  28.      Tamanyo = [
  29.        document.documentElement.clientWidth,
  30.        document.documentElement.clientHeight
  31.      ];
  32.     }else{
  33.       Tamanyo = [
  34.           document.getElementsByTagName('body')[0].clientWidth,
  35.           document.getElementsByTagName('body')[0].clientHeight
  36.       ];
  37.     }
  38.     return Tamanyo;
  39.   }
  40.   function buscador(){
  41.     alert('pedro');
  42.   }
  43.   window.onresize = function() {
  44.     var Tam = TamVentana();
  45.     document.getElementById('body').innerHTML = ('La ventana mide: [' + Tam[0] + ', ' + Tam[1] + ']');
  46.   };
  47.   window.onload = function(){
  48.     var Tam = TamVentana();
  49.     document.getElementById('body').innerHTML = ('La ventana mide: [' + Tam[0] + ', ' + Tam[1] + ']');
  50.     var input = document.getElementById('buscador');
  51.     input.onchange = function(){
  52.       var iframe = document.getElementById('iframe');
  53.       iframe.src = 'http://' + input.value;
  54.     }
  55.   }
  56. </head>
  57.   <section id="body"></section>
  58.   <input id="buscador" value="" name="buscador"/>
  59.   <iframe id="iframe" src="http://forosdelweb.com" width="100%" height="100%" frameborder=0></iframe>
  60. </body>
  61. </html>

te pone un pequeño input donde colocas la direccion así: "cursosdelwebmaster.com" sin el http

y te abre el iframe y al hacer resize de tu ventana te va diciendo las medidas. No es muy pulcro pero sirve perfectamente en chrome.