簡體   English   中英

保存密碼彈出Chrome瀏覽器

[英]Save password popup chrome browser

我正在開發一個chrome擴展程序,該擴展程序需要顯示彈出窗口以保存任何特定網站的密碼。

請考慮以下情形1)用戶在瀏覽器中打開www.facebook.com。 2)點擊登錄按鈕。 3)用戶已登錄。Chrome瀏覽器本身提供了“保存密碼”選項。 4)在這個階段,我希望我的插件顯示一些自定義彈出窗口以保存密碼。

現在的問題是,我的插件如何得知用戶已登錄某個網站。 或chrome瀏覽器如何知道已登錄某個網站並顯示彈出窗口以保存密碼。

任何幫助將不勝感激。

謝謝

I am able to solve my problem.I am posting my answer,that might be helpful to others also. 
So in my case, I want to know that some user has logged in to some website.Here website is not fix, it could be any random website.

So, in order to know, user has clicked "Login" button, i am adding eventListener to window through my content script.

My code is as follows:

window.addEventListener('click', function() {
    console.log(this);
});

In the above code you have the element("this") which is clicked.
You can now check id, text,button title of "this" to check if it is "Login" or not.

If its "Login", then user hit the login button.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM