Note that there are some explanatory texts on larger screens.

plurals
  1. POChrome Extension won't load my JavaScript from the popup file
    primarykey
    data
    text
    <p>I'm working on building a Chrome extension for a forum, but the problem is the JavaScript for my popup.html won't do anything. I added alert("popup.js running...") at the top and it does come up but then my popup doesn't display at all. This is a problem because JavaScript is going to be required for the popup page. I'm kind of lost, so I'm assuming I'm just missing something that is preventing my JavaScript from running. I heard the AdBlock extension would prevent it from running but I removed that and it still didn't work. Anyone see a problem?</p> <p>manifest.json</p> <pre><code>{ "name": "Riggy", "short_name": "Riggy", "description": "Create your own Roblox Forum signature with Riggy!", "version": "0.0.1", "manifest_version": 2, "browser_action": { "default_popup": "popup/popup.html" }, "permissions": [ "storage" ], "content_scripts": [ { "matches": ["http://www.roblox.com/*"], "js": ["scripts/jquery.js", "scripts/content.js"] } ] } </code></pre> <p>popup.html</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" type="text/css" href="popup.css" /&gt; &lt;script type="text/javascript" src="scripts/jquery.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;span class="title"&gt;Riggy&lt;/span&gt;&lt;br /&gt; &lt;span&gt;Signature: &lt;/span&gt;&lt;input name="siggy" id="siggy" value="Riggy is greatness!" /&gt; &lt;span id="output"&gt;[output]&lt;/span&gt; &lt;script type="text/javascript" src="popup.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>popup.js</p> <pre><code>alert("popup.js running"); $(document).on("ready", function() { var siggy = $("#siggy"); var output = $("#output"); function message(text) { output.html(text); } siggy.change(function() { chrome.storage.sync.set({"siggy": siggy.val()}, function() { message("Saved signature."); }); }); message("Riggy is ready!"); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    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. 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