mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-11 20:21:03 +00:00
Update chrome.js
This commit is contained in:
parent
d6c578dca3
commit
729e84bd8c
|
@ -557,7 +557,8 @@ var ChromeObject = function() {
|
|||
if (searchText.indexOf(':p(') != 0) {
|
||||
s += '(function() {'
|
||||
+ ' var elements = Object.values(document.querySelectorAll("' + selector + '")).filter(function(x) {'
|
||||
+ ' return (x.querySelector("' + subSelector + '").innerText.indexOf(decodeURIComponent("' + encodeURIComponent(searchText) + '")) > -1);'
|
||||
+ ' var el = x.querySelector("' + subSelector + '");'
|
||||
+ ' return ([el.innerText, el.getAttribute("aria-label"), el.getAttribute("class")].join(" ").indexOf(decodeURIComponent("' + encodeURIComponent(searchText) + '")) > -1);'
|
||||
+ ' });'
|
||||
+ ' if (elements.length > 0) {'
|
||||
+ ' var rect = elements[0].getBoundingClientRect();'
|
||||
|
|
Loading…
Reference in New Issue
Block a user