Partially revert "Add workflow menu button to thread lists"
This reverts commit 1e10d199a6171f88da129505977bf6ae69c2c362.
Reason for revert: we'll use Lit instead of Vue.js.
The following parts have not been reverted:
- The inject_workflows_menubtn string in the
src/static/_locales/en/messages.json file, since it will be used again
in the future, and this might cause the string translations to be
deleted from Pontoon.
- A minor CSS fix for the padding of .TWPT-btn--with-badge in
src/static/css/common/console.css.
Bug: twpowertools:115
Change-Id: I099e06d9964b2a5fb4e43baeef1a8fe07fe52043
diff --git a/src/contentScripts/communityConsole/main.js b/src/contentScripts/communityConsole/main.js
index f43a25a..5053c38 100644
--- a/src/contentScripts/communityConsole/main.js
+++ b/src/contentScripts/communityConsole/main.js
@@ -10,9 +10,8 @@
// #!endif
import InfiniteScroll from './infiniteScroll.js';
import {unifiedProfilesFix} from './unifiedProfiles.js';
-import Workflows from './workflows/workflows.js';
-var mutationObserver, options, avatars, infiniteScroll, workflows;
+var mutationObserver, options, avatars, infiniteScroll;
const watchedNodesSelectors = [
// App container (used to set up the intersection observer and inject the dark
@@ -124,13 +123,11 @@
}
// #!endif
- // Inject the batch lock and workflow buttons in the thread list if the
- // corresponding options are currently enabled.
- // The order is the inverse because the first one will be shown last.
- if (batchLock.shouldAddButton(node)) batchLock.addButtonIfEnabled(node);
-
- if (workflows.shouldAddThreadListBtn(node))
- workflows.addThreadListBtnIfEnabled(node);
+ // Inject the batch lock button in the thread list if the option is
+ // currently enabled.
+ if (batchLock.nodeIsReadToggleBtn(node)) {
+ batchLock.addButtonIfEnabled(node);
+ }
// Inject avatar links to threads in the thread list. injectIfEnabled is
// responsible of determining whether it should run or not depending on its
@@ -220,7 +217,6 @@
// Initialize classes needed by the mutation observer
avatars = new AvatarsHandler();
infiniteScroll = new InfiniteScroll();
- workflows = new Workflows();
// autoRefresh and extraInfo are initialized in start.js