fix(extra-info): show extra info in the RCE thread page
The extra info feature worked with the old thread pages. This CL brings
support to the new RCE thread pages.
Bug: twpowertools:93
Change-Id: I47e4235afa4f7ec441f5a92edfcc28b1cb5f0419
diff --git a/src/contentScripts/communityConsole/main.js b/src/contentScripts/communityConsole/main.js
index 3729937..4cd711c 100644
--- a/src/contentScripts/communityConsole/main.js
+++ b/src/contentScripts/communityConsole/main.js
@@ -64,10 +64,10 @@
'ec-canned-response-row .main .toolbelt',
// Question state chips container (for the extra info feature)
- 'ec-question .state-chips',
+ 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips',
// Replies (for the extra info feature)
- 'ec-thread ec-message',
+ 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-message-card',
// User activity chart (for the per-forum stats feature)
'ec-unified-user .scTailwindUser_profileUserprofilesection ' +
@@ -195,10 +195,12 @@
}
// Show additional details in the thread view.
- if (node.matches('ec-question .state-chips')) {
+ if (node.matches(
+ 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips')) {
window.TWPTExtraInfo.injectAtQuestionIfEnabled(node);
}
- if (node.matches('ec-thread ec-message')) {
+ if (node.matches(
+ 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-message-card')) {
window.TWPTExtraInfo.injectAtMessageIfEnabled(node);
}