File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ import { checkLicenseKey } from "./utils/licenseKey";
33import { localizeHtmlPage } from "./utils/pageUtils" ;
44
55import * as countries from "../public/res/countries.json" ;
6+ import Utils from "./utils" ;
7+ import { Category , CategorySkipOption } from "./types" ;
68
79// This is needed, if Config is not imported before Utils, things break.
810// Probably due to cyclic dependencies
911Config . config ;
1012
13+ const utils = new Utils ( ) ;
14+
1115window . addEventListener ( 'DOMContentLoaded' , init ) ;
1216
1317async function init ( ) {
@@ -31,6 +35,13 @@ async function init() {
3135 Config . config . payments . licenseKey = licenseKey ;
3236 Config . forceSyncUpdate ( "payments" ) ;
3337
38+ if ( ! utils . getCategorySelection ( "chapter" ) ) {
39+ Config . config . categorySelections . push ( {
40+ name : "chapter" as Category ,
41+ option : CategorySkipOption . ShowOverlay
42+ } ) ;
43+ }
44+
3445 alert ( chrome . i18n . getMessage ( "redeemSuccess" ) ) ;
3546 } else {
3647 alert ( chrome . i18n . getMessage ( "redeemFailed" ) ) ;
You can’t perform that action at this time.
0 commit comments