diff --git a/src/web/mjs/connectors/Hiperdex.mjs b/src/web/mjs/connectors/Hiperdex.mjs index 52ebea6942..14adb35688 100644 --- a/src/web/mjs/connectors/Hiperdex.mjs +++ b/src/web/mjs/connectors/Hiperdex.mjs @@ -7,6 +7,34 @@ export default class Hiperdex extends WordPressMadara { super.id = 'hiperdex'; super.label = 'Hiperdex'; this.tags = [ 'hentai', 'webtoon', 'english' ]; - this.url = 'https://hiperdex.com'; + this.config = { + url: { + label: 'URL', + description: 'This website changes between those two URL regularly.\n Please select the one to use', + input: 'select', + options: [ + { value: 'https://1sthiperdex.com', name: '1sthiperdex.com' }, + { value: 'https://hiperdex.com', name: 'hiperdex.com' }, + ], + value: 'https://1sthiperdex.com' + + } + }; + } + + get url() { + return this.config.url.value; + } + + set url(value) { + if (this.config && value) { + this.config.url.value = value; + Engine.Settings.save(); + } + } + + canHandleURI(uri) { + return this.url.includes(uri.hostname); } + }