send email in one click chrome extension

310 views
Skip to first unread message

AREEN GAUR

unread,
May 24, 2022, 9:33:18 AM5/24/22
to Chromium Extensions
I have created a chrome extension using which we can share data in one click to gmail(uses loggedin account)
it is working fine with version 2 
 var code = 
            setTimeout(function(){
              var Send = document.getElementById(':oy')
              console.log(Send);
              Send.click()
            },1000)
            
            //chrome.tabs.executeScript(tabId, { code: code })
///this part is not executing in version 3 , i have replaced chrome.tabs with chrome.scripting too, but the send button on gmail is not being get clicked
          

Stefan vd

unread,
May 26, 2022, 6:11:55 AM5/26/22
to Chromium Extensions, 2020p...@mnit.ac.in
Hi there,

Have you tried it such as this:
background.js file
function codetask(){
           if(document.getElementById(":oy")){
              var Send = document.getElementById(":oy")
              console.log("Click on the send button");
              Send.click();
        }
}
chrome.scripting.executeScript({
                        target: {tabId: thattab.id},
                        func: codetask
 });

Thanks,
Stefan vd

Stefan vd

unread,
May 27, 2022, 3:30:05 AM5/27/22
to Chromium Extensions
Hi Areen,

I am glad to hear from you. And that you solved your issue.

Thanks,
Stefan vd

On Thu, May 26, 2022 at 1:37 PM AREEN GAUR <2020p...@mnit.ac.in> wrote:
Thanks alot, it works

AREEN GAUR

unread,
May 29, 2022, 7:25:53 AM5/29/22
to Chromium Extensions, Stefan vd
is it possible that using extension we create a text file in extension enable system and save all key logs in that file.

Stefan vd

unread,
May 29, 2022, 7:36:45 AM5/29/22
to Chromium Extensions, 2020p...@mnit.ac.in, Stefan vd
Hi Areen,

A Chrome Extension cannot get read/write permissions for the real filesystem (that to create a file).
Why use not localstorage or Chrome.storage API?

Thanks,
Stefan vd

RyuOffice Legalize

unread,
May 29, 2022, 8:14:25 AM5/29/22
to Stefan vd, 2020p...@mnit.ac.in, Chromium Extensions
What would you do?


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/699e88df-0eec-4e20-8dd3-db7242edbbb8n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages