I am writing a Google Chrome Extension. Now I need to detect the language of a frame in a tab. I read the post Detecting the current tab language using Chrome extension? but the answers involve examining the whole tab, apparently. Here I am in a chat and I have to examine a response in a table in a frame to see if the respondent has changed languages so that I can respond appropriately.
So what I have is either a frame or a string from the table.
Any suggestions? I am writing in javascript and I am not familiar with jquery.
不是直接在Chrome扩展程序API中,而是可以创建一个content_script来将element.addEventListener("DOMNodeInserted", function() { something })
侦听器附加到要检查的区域,然后向翻译api发出请求检测语言。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.