Foros del Web » Creando para Internet » HTML »

Compilar mi extension de Google Chrome

Estas en el tema de Compilar mi extension de Google Chrome en el foro de HTML en Foros del Web. Hola Amigos, tengo una web, pero mis users casi no usan el buscador, y me dijeron que si podia hacer algo mas sencillo y rapido, ...
  #1 (permalink)  
Antiguo 11/09/2011, 20:00
 
Fecha de Ingreso: agosto-2010
Mensajes: 49
Antigüedad: 13 años, 8 meses
Puntos: 1
Pregunta Compilar mi extension de Google Chrome

Hola Amigos, tengo una web, pero mis users casi no usan el buscador, y me dijeron que si podia hacer algo mas sencillo y rapido, he buscado tutos y demas para hacer, ya la tengo lista creo, pero tengo problemas porque no se como subirla ni esas cosas, porfavor les pido que me ayuden, bueno primero aqui les pongo lo que tengo en la carpeta llamada extension, en esa carpeta tengo todo lo que lleva la extension





Les dejare lo que contiene cada codigo, bueno este es el manifest.json

Código:
{
"update_url":"http://api.flickr.com/",
  "name": "Buscador Falkudivers",
  "version": "1.0.1",
  "description": "Busca en Falkudivers con un simple click.",
  "icons": {
     "16": "16.png",
     "32": "32.png",
     "48": "48.png",
     "128": "128.png"

  },
  "browser_action": {
      "default_icon": "19.png",
      "default_title": "Buscador Falkudivers",
      "popup": "search.html"
   },
  "background_page": "background.html",
  "homepage_url": "http://www.falkudivers.org/?searchword=&searchphrase=any&limit=&ordering=newest&view=search&Itemid=99999999&option=com_search",
  "permissions": [
    "http://api.flickr.com/"
  ]
}


Este otro es el archivo script

Código:
var url = "http://www.falkudivers.org/?searchword=&searchphrase=any&limit=&ordering=newest&view=search&Itemid=99999999&option=com_search";
  function init() {
            $("searchBox").focus();
                $("searchButton").addEventListener("click",_search,false);
                $("searchBox").addEventListener("keyup",_keyUp,false);

                var as = new O($("searchBox"));
  }
  function _keyUp(e) {
          if (e.keyCode==13) {
                _search();
          }
  }     
  function _search() {
      var query = $("searchBox").value;
          chrome.tabs.create({url:url+query})
  }             
  function $(id) {
      return document.getElementById(id);
  }     

function O(g){var c=this;var A=null;var o="";c.d=null;var f= -1;var j=0;var C=false;c.G=function(){g.addEventListener("keydown",c.L,false);g.addEventListener("keyup",c.K,false);g.addEventListener("blur",c.H,false);},c.getData=function(m){var URL="http://clients1.google.com.ar/complete/search?%20hl=es&json=t&jsonp=callbackfunction&q="+m;var l;l=new XMLHttpRequest();l.open("GET",URL,true);l.onreadystatechange=function(){if(l.readyState==4){if(l.status==200){var response;if(o==m){if(c.d==null){c.d=document.createElement("div");document.body.appendChild(c.d);c.d.style.display='none';}c.d.setAttribute("class","fd");c.d.style.width=(g.clientWidth)+"px";c.F();c.d.innerHTML="";var D=l.responseText;var v=D.substring(new String("callbackfunction").length+1);var v=v.substring(0,v.length-1);var M=JSON.parse(v);c.d.style.display='block';var list=M[1];j=list.length;if(j>10)j=10;for(var i=0;i<j;i++){var r=list[i];var row=document.createElement("div");var pos=r.indexOf(m);if(pos!= -1){row.innerHTML=r.substr(0,pos+m.length)+"<b>"+r.substr(pos+m.length)+"</b>";}else{row.textContent=r;}row.setAttribute("id","gffg"+i);row.setAttribute("class","gffg");row.index=i;row.J=true;row.addEventListener("mouseover",function(e){var row=e.currentTarget;if(f!= -1)document.getElementById("gffg"+f).setAttribute("class","gffg");row.setAttribute("class","gffg selected");f=row.index;},false);row.addEventListener("mousedown",function(e){var row=e.currentTarget;g.value=row.textContent;c.B(row.textContent);},false);c.d.appendChild(row);}f= -1;if(j==0){c.d.style.display='none';C=false;}else{c.d.style.display='block';C=true;}I=27+j*17;document.getElementById("container").style.height=I+"px";}}}};l.send("");};c.K=function(e){var keyCode=e.keyCode;if(keyCode!=13){if((keyCode!=38)&&(keyCode!=40)&&(keyCode!=116)){if(A!=null){window.clearInterval(A);A=null;}o=g.value;A=setTimeout(c.getData,10,g.value)}else{}}else{}},c.L=function(e){var keyCode=e.keyCode;if(keyCode==13){if(f!= -1){g.value=document.getElementById("gffg"+f).textContent}c.B(g.value);return;}if((keyCode!=38)&&(keyCode!=40)){}else{if(keyCode==38){if(f!= -1)document.getElementById("gffg"+f).setAttribute("class","gffg");f--;if(f<0)f=j-1;}else{if(f!= -1)document.getElementById("gffg"+f).setAttribute("class","gffg");f++;if(f>=j)f=0;}var row=document.getElementById("gffg"+f);row.setAttribute("class","gffg selected");g.value=row.textContent;}};c.H=function(e){if((e.explicitOriginalTarget!=c.d)&&(e.explicitOriginalTarget.J==null)){o="--";if(c.d!=null){c.d.style.display='none';document.getElementById("container").style.height="3px";}}},c.F=function(){var k=g;var x=0;var y=g.offsetHeight-1;while((k.offsetParent)&&(k.tagName.toLowerCase()!='body')){x+=k.offsetLeft;y+=k.offsetTop;k=k.offsetParent;}x+=k.offsetLeft;y+=k.offsetTop;if(c.d!=null){c.d.style.left=x+"px";c.d.style.top=y+"px";}},c.B=function(m){o="--";if(c.d!=null){c.d.style.display='none';document.getElementById("container").style.height="29px";_search();}};c.G();}

El archivo search

Código:
<!DOCTYPE html>
<html>
<head>
        <link rel="stylesheet" type="text/css" href="style.css">
        <script type="text/javascript" src="script.js"></script>
</head>
<body onload="init()">
  <div id="container">
    <table width="100%">
           <tr>
            <td width="100%">
                  <input id="searchBox" type="text" value=""></input>
            </td>
            <td width="50">
                  <img src="search_btn.png" id="searchButton" title="Buscar"></img>
                </td>
         </table>
  </div>
</body>
</html>
Este es el archivo style


Código:
html {
        margin:0px;
        padding:0px;
        overflow:hidden;
  }
  body {
        margin:2px;
        padding:2px;
  }
  table, tr, td {
        margin:0px;
        padding:0px;
  }
  table {
        border-collapse: collapse;
  } 
  td {
        margin: 0px;
        padding: 0px;
        border: 0px #000 solid;
  } 
  #container {
        width:255px;
  }
  #searchBox {
         width:202px;
         height:23px;
         font-size:13px;
         font-family:arial;
         color:#000000;
         margin-top:3px;
         background-image:url('favicon.ico');
         background-repeat:no-repeat;
         background-position:4px 5px;
         padding-left:25px;
         padding-top:2px;
         border:1px solid #9a9a9a;
         border-right:0px;
  }
  #searchButton {
         float:right;
         width:28px;
         height:25px;
         margin-top:3px;
         cursor:pointer;
         border:1px solid #9a9a9a;
         border-left:0px;
  }

  .fd {
         position:absolute;
         z-index:1000;
         top:100px;
         left:0px;
         border:1px solid #7a7a7a;
         background-color:#ffffff;
         padding-bottom:1px;
  }
  .gffg {
         float:left;
         clear:both;
         font-size:13px;
         font-family:arial;
         width:225px;
         cursor:default;
         padding-top:1px;
         padding-left:2px;
         color:#1e1e2e;
         overflow: hidden;
         white-space: nowrap;
         text-overflow: ellipsis;
         -moz-user-select : none;
  }
  .gffg.selected{
         background-color:#d5e2ff;
  }



Que podra estar fallando???, que tengo que hacer para subirlo, casi no hay info de eso, gracias espero su ayuda
  #2 (permalink)  
Antiguo 11/09/2011, 21:38
Avatar de zerokilled
Javascripter
 
Fecha de Ingreso: abril-2009
Ubicación: Isla del Encanto, La Borinqueña [+>==]
Mensajes: 8.050
Antigüedad: 15 años
Puntos: 1485
Respuesta: Compilar mi extension de Google Chrome

buenas,
primero tienes que empaquetar la extensión con la herramienta que provee el mismo navegador. es decir, en chrome://extensions/ tienes un botón que dice "empaquetar extensión". luego tienes que buscar la carpeta raíz de la extension. cuando termines, te creará dos archivos: un *.crx y un *.pem. el que tienes que distribuir es el *.crx. cómo distribuirlo ya depende de ti. puedes subirlo a tu servidor y proveer un enlace a los usuarios. o bien puedes distribuirlo en la tienda de google apps pagando una cantidad.

__________________
la maldad es una virtud humana,
y la espiritualidad es la lucha del hombre contra su maldad.

Etiquetas: buscadores
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:55.