Change window.autoRefresh to window.TWPTAutoRefresh
This will make it much less likely to conflict with another vanilla
Community Console global variable called like that.
Change-Id: I4da7aafd1bd4694262fa09adb14709a8510743b3
diff --git a/src/contentScripts/communityConsole/main.js b/src/contentScripts/communityConsole/main.js
index 5db25fc..5518df8 100644
--- a/src/contentScripts/communityConsole/main.js
+++ b/src/contentScripts/communityConsole/main.js
@@ -118,7 +118,7 @@
// Set up the autorefresh list feature
if (options.autorefreshlist && ('tagName' in node) &&
node.tagName == 'EC-THREAD-LIST') {
- autoRefresh.setUp();
+ window.TWPTAutoRefresh.setUp();
}
// Redirect unified profile iframe to dark version if applicable
@@ -133,7 +133,7 @@
// Remove snackbar when exiting thread list view
if (options.autorefreshlist && 'tagName' in node &&
node.tagName == 'EC-THREAD-LIST') {
- autoRefresh.hideUpdatePrompt();
+ window.TWPTAutoRefresh.hideUpdatePrompt();
}
}
diff --git a/src/contentScripts/communityConsole/start.js b/src/contentScripts/communityConsole/start.js
index 93ee6ab..d4c4bd6 100644
--- a/src/contentScripts/communityConsole/start.js
+++ b/src/contentScripts/communityConsole/start.js
@@ -26,7 +26,7 @@
// Initialized here instead of in main.js so the first |ViewForumResponse|
// event is received if it happens when the page loads.
if (items.autorefreshlist)
- window.autoRefresh = new AutoRefresh();
+ window.TWPTAutoRefresh = new AutoRefresh();
if (items.ccdarktheme) {
switch (items.ccdarktheme_mode) {