Skip to content

Commit ff473a5

Browse files
author
Anbcodes
committed
change when it gets contents of the webpack
1 parent 8b4ff57 commit ff473a5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
let text = document.body.innerText
2-
let textToFind = ""
31
chrome.storage.sync.get({
42
text: '',
53
time: 1000
64
}, (items) => {
7-
textToFind = items.text;
5+
let textToFind = items.text;
86
let regexStr = "("
97
textToFind.split("\n").forEach((word, index) => {
108
if (index != textToFind.split("\n").length-1) {
@@ -17,6 +15,7 @@ chrome.storage.sync.get({
1715

1816
let regex = new RegExp(regexStr, "gi")
1917
setTimeout(() => {
18+
let text = document.body.innerText
2019
let found = text.match(regex)
2120
if (found) {
2221
alert(`Found Word`)

0 commit comments

Comments
 (0)