Skip to content

Commit

Permalink
Removed very temporary debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
toydotgame committed Jun 15, 2024
1 parent e5e464a commit 088e4fd
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ var supportedDomains = ["patents", "scholar", "books", "shopping", "news", "tren
var supportedPages = ["/maps", "/videohp", "/finance", "/travel", "/", "/webhp", "/imghp", "/search"];

var config;
var runningObservers = 0; // DEBUG CODE REMOVE FOR PRODUCTION

var subdomain = window.location.host.split(".")[0];
var page = "/" + window.location.pathname.split("/")[1];
Expand Down Expand Up @@ -200,8 +199,6 @@ function RunWhenReady(selectors, code) {
DebugLog("RunWhenReady(): Element with selector \"" + selectors[i] + "\" loaded...");
code(loadedElement);
if(mutationInstance != null) { // Running in observer:
runningObservers -= 1; // DEBUG CODE REMOVE FOR PRODUCTION
DebugLog("Running observers = " + runningObservers); // DEBUG CODE REMOVE FOR PRODUCTION
mutationInstance.disconnect();
break;
} // Running in function scope:
Expand All @@ -218,8 +215,6 @@ function RunWhenReady(selectors, code) {
var observer = new MutationObserver(function (mutations, mutationInstance) {
GetLoadedElement(mutationInstance);
});
runningObservers += 1; // DEBUG CODE REMOVE FOR PRODUCTION
DebugLog("Running observers = " + runningObservers); // DEBUG CODE REMOVE FOR PRODUCTION
observer.observe(document, {childList: true, subtree: true});
}

Expand Down

0 comments on commit 088e4fd

Please sign in to comment.