diff --git a/scripts/multisrc/lightnovelwp/sources.json b/scripts/multisrc/lightnovelwp/sources.json index 93b90fc..ac24726 100644 --- a/scripts/multisrc/lightnovelwp/sources.json +++ b/scripts/multisrc/lightnovelwp/sources.json @@ -197,8 +197,8 @@ "options": { "lang": "English", "reverseChapters": true, - "customJs": "\n $('div.entry-content > p').each((_,el) => {\n const url = this.site + chapterPath.slice(0, -1);\n const encode = url.length * url.charCodeAt(url.length - 1) * 2 % 3;\n\n const offsets = new Map([[0, 4223], [1, 12415], [2, 7007]]);\n const offset = offsets.get(encode) ?? 4223;\n\n $(el).text($(el).text().split('').map(char => {\n let code = char.charCodeAt(0);\n return (code < offset || code > offset+255) ? char : String.fromCharCode(code-offset);\n }).join(''));\n });\n", - "versionIncrements": 1 + "customJs": "\n $('div.entry-content script').remove();\n $('div.entry-content > p').each((_,el) => {\n const url = this.site + chapterPath.slice(0, -1);\n const encode = url.length * url.charCodeAt(url.length - 1) * 2 % 3;\n\n const offsets = new Map([[0, 4223], [1, 12415], [2, 7007]]);\n const offset = offsets.get(encode) ?? 4223;\n\n $(el).text($(el).text().split('').map(char => {\n let code = char.charCodeAt(0);\n return (code < offset || code > offset+255) ? char : String.fromCharCode(code-offset);\n }).join(''));\n });\n", + "versionIncrements": 2 } }, { diff --git a/src/plugins/english/freewebnovel.ts b/src/plugins/english/freewebnovel.ts index c0a3f45..506105f 100644 --- a/src/plugins/english/freewebnovel.ts +++ b/src/plugins/english/freewebnovel.ts @@ -7,7 +7,7 @@ class FreeWebNovel implements Plugin.PluginBase { id = 'FWN.com'; name = 'Free Web Novel'; site = 'https://freewebnovel.com/'; - version = '1.1.0'; + version = '1.1.1'; icon = 'src/en/freewebnovel/icon.png'; async getCheerio(url: string): Promise { @@ -124,11 +124,9 @@ class FreeWebNovel implements Plugin.PluginBase { } async searchNovels(searchTerm: string): Promise { - const r = await fetchApi(this.site + 'search/', { + const r = await fetchApi(this.site + 'search', { headers: { 'Content-Type': 'application/x-www-form-urlencoded', - Referer: this.site, - Origin: this.site, }, method: 'POST', body: new URLSearchParams({ searchkey: searchTerm }).toString(),