Patch
This commit is contained in:
parent
e8eef5500c
commit
b0be378fb1
|
@ -1,5 +1,6 @@
|
|||
var valChange = /\by\/n\b|\(y\/n\)|\[y\/n\]/ig;
|
||||
var person;
|
||||
var replaceAll = function (){
|
||||
chrome.storage.local.get(null, function(items){
|
||||
for(var key in items){
|
||||
if(items[key]){
|
||||
|
@ -13,6 +14,7 @@ chrome.storage.local.get(null, function(items){
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function escapeRegExp(str) {
|
||||
|
@ -67,7 +69,7 @@ function handleText(textNode, val, p){
|
|||
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
||||
|
||||
var observer = new MutationObserver(function(mutations, observer) {
|
||||
loadReplace(valChange, person);
|
||||
replaceAll();
|
||||
});
|
||||
|
||||
// define what element should be observed by the observer
|
||||
|
@ -77,3 +79,7 @@ observer.observe(document, {
|
|||
childList: true
|
||||
//...
|
||||
});
|
||||
|
||||
//main
|
||||
|
||||
replaceAll();
|
Loading…
Reference in New Issue