We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b4ff57 commit ff473a5Copy full SHA for ff473a5
1 file changed
index.js
@@ -1,10 +1,8 @@
1
-let text = document.body.innerText
2
-let textToFind = ""
3
chrome.storage.sync.get({
4
text: '',
5
time: 1000
6
}, (items) => {
7
- textToFind = items.text;
+ let textToFind = items.text;
8
let regexStr = "("
9
textToFind.split("\n").forEach((word, index) => {
10
if (index != textToFind.split("\n").length-1) {
@@ -17,6 +15,7 @@ chrome.storage.sync.get({
17
15
18
16
let regex = new RegExp(regexStr, "gi")
19
setTimeout(() => {
+ let text = document.body.innerText
20
let found = text.match(regex)
21
if (found) {
22
alert(`Found Word`)
0 commit comments