Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to do a POST request in a chrome extension?
    primarykey
    data
    text
    <p>I am making a chrome extension to send a post request to a certain URL, and I don't care about the response. When I run my javascript in my browser it works fine but if I put in the chrome extension, it doesn't even send.Here is my popup.html file</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;BCA Auto Login&lt;/title&gt; &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; body{ background-color: #2c3e50; } label{ color:#f1c40f; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;form method="POST" id="form"&gt; &lt;label&gt;Enter username &lt;input id="username"&gt; &lt;/label&gt; &lt;br&gt; &lt;label&gt;Enter password &lt;input id="password" type="password"&gt; &lt;/label&gt; &lt;br&gt; &lt;button type="submit"&gt;Submit&lt;/button&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; $('#form').submit(function (event) { event.preventDefault(); $.ajax({ type : 'POST', url : 'https://testurl.com/', data : { reqFrom: 'perfigo_simple_login.jsp', uri: 'https://ccahack.bergen.org/', cm: 'ws32vklm', userip: '168.229.105.180', os: 'MAC_OSX', index: '4', username: 'username', password: 'password', provider: 'BCA', login_submt: 'Continue' } }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And here is my mainfest.json:</p> <pre><code>{ "manifest_version": 2, "name": "Auto Login", "description": "This extension automatically signs you into the wifi", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "cookies", "http://*/*" "https://*/*" ] } </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.
 

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