Skip to content

Commit fba1ff6

Browse files
author
John P. rouillard
committed
feat: issue #80 - Add emergency shutoff for roundup-classhelper
1 parent f3bb401 commit fba1ff6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ In addition to keyboard navigation, the `<roundup-classhelper>` component can be
128128

129129
<img src="./doc-assets/image-5.png" alt="Image Title" width="40%">
130130

131+
There is also an emergency mechanism to disable roundup-classhelper and allow the fallback classhelper to be used. Set `DISABLE_CLASSHELPER` to `true` in classhelper.js. After force reloading the tracker page, the roundup-classhelper will be disabled without having to edit all the templates and remove `<roundup-classhelper>`.
132+
131133
### Error Handling
132134
* In case of errors, the component will use the fallback to use ClassHelper link while alerting the user.
133135
* For further debugging, users can open the browser console and inspect the results.

html/classhelper.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* @property {number} pageSize
2020
*/
2121

22+
23+
// change this to true to disable the classhelper
24+
const DISABLE_CLASSHELPER = false
25+
2226
// Let user customize the css file name
2327
const CSS_STYLESHEET_FILE_NAME = "@@file/classhelper.css";
2428

@@ -1336,6 +1340,10 @@ function enableClassHelper() {
13361340
return;
13371341
}
13381342

1343+
if (DISABLE_CLASSHELPER) {
1344+
return;
1345+
}
1346+
13391347
/** make api call if error then do not register*/
13401348
// http://localhost/demo/rest
13411349

0 commit comments

Comments
 (0)