Listen to click event in web page chrome extension

797 views
Skip to first unread message

Meenakshi Nathan

unread,
Jan 6, 2015, 9:20:10 AM1/6/15
to chromium-...@chromium.org
Below is my manifest.json:        
{
    

     "name": "My Extension Name",
 
     "version": "1.9.1",
    
     "manifest_version": 2,
    
     "icons": {  "16": "icon16.png",
               
                 "48": "icon48.png",
               
                 "128": "icon128.png" },
    
     "homepage_url": "https://www.mysite.com",
    
     "description": "My Extension Description",
    
     "permissions": ["http://www.example.com/*"],
    
     "content_scripts" : [{
        
             "matches" : [ "http://www.example.com/*"],
         
             "js" : ["contentscript.js"],
          
             "run_at" : "document_end"

      }],
    
            "web_accessible_resources": ["script.js"]

}

My contentscript.js is:

var s = document.createElement('script');


s.src = chrome.extension.getURL("script.js");


(document.head||document.documentElement).appendChild(s);

script.js:

$.post("https://www.mysite.com/app/myfolder/", function(html){
          

      $("body").prepend(html);
    

});

I would like to access the DOM in http://www.example.com/. There is a form in http://www.example.com/. when the submit button of the form is clicked, iw ould like to get the post values in www.mysite.com. How to achieve this?

karan singh

unread,
May 15, 2018, 1:59:27 AM5/15/18
to Chromium-Extensions-Announce, natha...@gmail.com
Are you still looking for this solution ?

Lily Vue

unread,
May 15, 2018, 1:30:48 PM5/15/18
to karan singh, Chromium-Extensions-Announce, natha...@gmail.com
ima leave this group if i have to just dont text me back gosh


--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-extensions@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/bffc06ff-981f-4a44-8083-3162d2aa2b0f%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

PhistucK

unread,
May 16, 2018, 3:15:57 AM5/16/18
to 1234...@student.iss.k12.nc.us, Chromium-extensions
If you meant to unsubscribe -
Try sending a blank e-mail to chromium-extens...@chromium.org (note that +unsubscribe in the address, it is important). If you already did exactly that, skip this.
If that does not work and you are still getting e-mails -
2. Click on the button that has an icon of a head and shoulders.
3. Click on "Leave group" and you are done. Or -
 a. Select in the selection box - "Don't send email updates".
 b. Click on "Save".



PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Reply all
Reply to author
Forward
0 new messages