Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>Lib/main.js</code> is not where you have to put your application code. There you would put your initialization code. Like we did in chrome's <code>manifest.json</code>. Take a look at my firefox extension's <a href="https://github.com/juzerali/Don-t-lose-your-query/blob/master/Firefox-Addon/resources/dont-lose-your-query/lib/main.js" rel="nofollow"><code>main.js</code></a>. It looks like this:</p> <pre><code>exports.main = function() {}; var { MatchPattern } = require("match-pattern"); var pageMod = require("page-mod"); var data = require("self").data; pageMod.PageMod({ include: [/.*phpminiadmin.*/, /.*phpmyadmin.*/, /.*devadmin.*/], contentScriptWhen: 'ready', contentScriptFile: [data.url('jquery-1.7.2.min.js'),data.url('jquery-ui-1.8.20.custom.min.js'),data.url('bootstrap.min.js'),data.url('querysaver.js')] }); </code></pre> <p>It is the <code>pageMod</code> that would allow you to load your javascript on a page's context, which is of course inside a separate world w.r.t the page's own context.</p> <p>The scripts that you wish to load should reside inside <code>../data</code> with respect to <code>lib/</code>.</p> <p>Take a look at folder structure of my addon. <a href="https://github.com/juzerali/Don-t-lose-your-query/tree/master/Firefox-Addon" rel="nofollow">https://github.com/juzerali/Don-t-lose-your-query/tree/master/Firefox-Addon</a>. I don't remember correctly but you might be needing to include api-utils.</p> <p>I found it helpful to use Firefox's SDK.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload