Feat: Create custom header changer (#694)
* Add custom header adder * Make custom headers work in apip * remove unnecesarry console.logs * Remove add-cookie button remains * getFile and remove unnecesarry ifs * Add warning and copy to code function
This commit is contained in:
@@ -0,0 +1,709 @@
|
|||||||
|
{
|
||||||
|
"العربية": [
|
||||||
|
{
|
||||||
|
"id": "ar-mtl",
|
||||||
|
"name": "ArMTL[madara]",
|
||||||
|
"site": "https://ar-mtl.club/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/ArMTL[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/armtl.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "arnovel",
|
||||||
|
"name": "ArNovel[madara]",
|
||||||
|
"site": "https://arnovel.me/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/ArNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/arnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "hizomanga",
|
||||||
|
"name": "HizoManga[madara]",
|
||||||
|
"site": "https://hizomanga.com/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/HizoManga[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/hizomanga.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "kol-novel",
|
||||||
|
"name": "Kol Novel[wpmangastream]",
|
||||||
|
"site": "https://kolnovel.com/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/KolNovel[wpmangastream].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/wpmangastream/icons/kol-novel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "kolnovel",
|
||||||
|
"name": "KolNovel",
|
||||||
|
"site": "https://kolnovel.lol/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/kolnovel.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/wpmangastream/icons/kolnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novel4up",
|
||||||
|
"name": "Novel4Up[madara]",
|
||||||
|
"site": "https://novel4up.com/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/Novel4Up[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/novel4up.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "riwyat",
|
||||||
|
"name": "Riwyat[madara]",
|
||||||
|
"site": "https://riwyat.com/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/Riwyat[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/riwyat.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "teamxnovel",
|
||||||
|
"name": "TeamXNovel[madara]",
|
||||||
|
"site": "https://teamxnovel.com/",
|
||||||
|
"lang": "العربية",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/arabic/TeamXNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/teamxnovel.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"中文, 汉语, 漢語": [
|
||||||
|
{
|
||||||
|
"id": "linovelib",
|
||||||
|
"name": "Linovelib",
|
||||||
|
"site": "https://w.linovelib.com",
|
||||||
|
"lang": "中文, 汉语, 漢語",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/chinese/linovelib.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/cn/linovelib/icon.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"English": [
|
||||||
|
{
|
||||||
|
"id": "1stkissnovel",
|
||||||
|
"name": "FirstKissNovel[madara]",
|
||||||
|
"site": "https://1stkissnovel.org/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/FirstKissNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/firstkissnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "BLN.com",
|
||||||
|
"name": "BestLightNovel",
|
||||||
|
"site": "https://bestlightnovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/bestlightnovel.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/en/bestlightnovel/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boxnovel",
|
||||||
|
"name": "BoxNovel[madara]",
|
||||||
|
"site": "https://boxnovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/BoxNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/boxnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "clicknovel",
|
||||||
|
"name": "ClickNovel[madara]",
|
||||||
|
"site": "https://clicknovel.net/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/ClickNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/clicknovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "cratenovel",
|
||||||
|
"name": "CrateNovel[madara]",
|
||||||
|
"site": "https://cratenovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/CrateNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/cratenovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "daonovel",
|
||||||
|
"name": "DaoNovel[madara]",
|
||||||
|
"site": "https://daonovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/DaoNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/daonovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "fanTLS",
|
||||||
|
"name": "Fans Translations[madara]",
|
||||||
|
"site": "https://fanstranslations.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/FansTranslations[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/fanstranslations.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "freenovel.me",
|
||||||
|
"name": "FreeNovelMe[madara]",
|
||||||
|
"site": "https://freenovel.me/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/FreeNovelMe[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/freenovelme.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ftest",
|
||||||
|
"name": "Filter Test",
|
||||||
|
"site": "https://noblemtl.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/filterTests.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/en/noblemtl/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "FWN.com",
|
||||||
|
"name": "Web NOVEL",
|
||||||
|
"site": "https://freewebnovel.com",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/freewebnovel.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/en/freewebnovel/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "guavaread",
|
||||||
|
"name": "Guavaread[madara]",
|
||||||
|
"site": "https://guavaread.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Guavaread[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/guavaread.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "lnheaven",
|
||||||
|
"name": "LightNovelHeaven[madara]",
|
||||||
|
"site": "https://lightnovelheaven.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/LightNovelHeaven[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/lightnovelheaven.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Ltnovel.com",
|
||||||
|
"name": "Ltnovel[readwn]",
|
||||||
|
"site": "https://www.ltnovel.com",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Ltnovel[readwn].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/readwn/icons/ltnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "lunarletters",
|
||||||
|
"name": "LunarLetters[madara]",
|
||||||
|
"site": "https://www.lunarletters.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/LunarLetters[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/lunarletters.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mostnovel",
|
||||||
|
"name": "MostNovel[madara]",
|
||||||
|
"site": "https://mostnovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/MostNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/mostnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mtl-novel",
|
||||||
|
"name": "MTL-Novel[madara]",
|
||||||
|
"site": "https://mtl-novel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/MTLNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/mtl-novel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mtlnovel.club",
|
||||||
|
"name": "MTLNovel.Club[madara]",
|
||||||
|
"site": "https://mtlnovel.club/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/MTLNovelClub[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/mtlnovel.club.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "mysticalmerries",
|
||||||
|
"name": "MysticalSeries[madara]",
|
||||||
|
"site": "https://mysticalmerries.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/MysticalSeries[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/mysticalseries.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "neosekaiTLS",
|
||||||
|
"name": "NeoSekai Translations[madara]",
|
||||||
|
"site": "https://www.neosekaitranslations.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NeoSekaiTranslations[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/neosekaitranslations.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noblemtl",
|
||||||
|
"name": "NobleMTL",
|
||||||
|
"site": "https://noblemtl.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/nobleMTL.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/en/noblemtl/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "nocturneTLS",
|
||||||
|
"name": "Nocturne Translations[madara]",
|
||||||
|
"site": "https://nocturnetls.net/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NocturneTranslations[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/nocturnetranslations.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noobchanTL",
|
||||||
|
"name": "Noobchan Translation[madara]",
|
||||||
|
"site": "https://noobchan.xyz/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NoobchanTranslation[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/noobchantranslation.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novelmultiverse",
|
||||||
|
"name": "NovelMultiverse[madara]",
|
||||||
|
"site": "https://www.novelmultiverse.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NovelMultiverse[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/novelmultiverse.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novelr18",
|
||||||
|
"name": "NovelR18[madara]",
|
||||||
|
"site": "https://novelr18.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NovelR18[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/novelr18.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novelroom",
|
||||||
|
"name": "Novelroom.net[madara]",
|
||||||
|
"site": "https://novelroom.net/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Novelroomnet[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/novelroom.net.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novelstic",
|
||||||
|
"name": "Novelstic[madara]",
|
||||||
|
"site": "https://novelstic.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Novelstic[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/novelstic.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "novelTL",
|
||||||
|
"name": "NovelTranslate[madara]",
|
||||||
|
"site": "https://noveltranslate.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/NovelTranslate[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/noveltranslate.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "onlymtl",
|
||||||
|
"name": "OnlyMTL[madara]",
|
||||||
|
"site": "https://www.onlymtl.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/OnlyMTL[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/onlymtl.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "pandamtl",
|
||||||
|
"name": "PandaMTL",
|
||||||
|
"site": "https://pandamtl.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/pandaMTL.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/en/wordpress/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "readwebnovels",
|
||||||
|
"name": "ReadWebNovels[madara]",
|
||||||
|
"site": "https://readwebnovels.net/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/ReadWebNovels[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/readwebnovels.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sleeptTLS",
|
||||||
|
"name": "SleepyTranslations[madara]",
|
||||||
|
"site": "https://sleepytranslations.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/SleepyTranslations[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/sleepytranslations.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sonicmtl",
|
||||||
|
"name": "SonicMTL[madara]",
|
||||||
|
"site": "https://www.sonicmtl.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/SonicMTL[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/sonicmtl.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sugarbbscan",
|
||||||
|
"name": "Sugar Babies[madara]",
|
||||||
|
"site": "https://sugarbbscan.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/SugarBabies[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/sugarbabies.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sweetEscapeTL",
|
||||||
|
"name": "Sweet Escape Translations[madara]",
|
||||||
|
"site": "https://sweetescapetranslations.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/SweetEscapeTranslations[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/sweetescapetranslations.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "webnovelover",
|
||||||
|
"name": "WebNovelLover[madara]",
|
||||||
|
"site": "https://www.webnovelover.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/WebNovelLover[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/webnovellover.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wuxiacity",
|
||||||
|
"name": "Wuxiacity[readwn]",
|
||||||
|
"site": "https://www.wuxiacity.com",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Wuxiacity[readwn].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/readwn/icons/wuxiacity.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wuxiap",
|
||||||
|
"name": "Wuxiap[readwn]",
|
||||||
|
"site": "https://www.wuxiap.com",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/Wuxiap[readwn].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/readwn/icons/wuxiap.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wuxiaworld.site",
|
||||||
|
"name": "WuxiaWorld.Site[madara]",
|
||||||
|
"site": "https://wuxiaworld.site/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/WuxiaWorldSite[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/wuxiaworld.site.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "zetroTL",
|
||||||
|
"name": "Zetro Translation[madara]",
|
||||||
|
"site": "https://zetrotranslation.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/ZetroTranslation[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/zetrotranslation.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "zinnovel",
|
||||||
|
"name": "ZinnNovel[madara]",
|
||||||
|
"site": "https://zinnovel.com/",
|
||||||
|
"lang": "English",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/english/ZinnNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/zinnnovel.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"français, française": [
|
||||||
|
{
|
||||||
|
"id": "chireads.com",
|
||||||
|
"name": "Chireads",
|
||||||
|
"site": "https://chireads.com",
|
||||||
|
"lang": "français, française",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/french/chireads.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/fr/chireads/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "lightnovelfr",
|
||||||
|
"name": "Ligh Novel FR[wpmangastream]",
|
||||||
|
"site": "https://lightnovelfr.com/",
|
||||||
|
"lang": "français, française",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/french/LighNovelFR[wpmangastream].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/wpmangastream/icons/lightnovelfr.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "NDG.com",
|
||||||
|
"name": "NovelDeGlace",
|
||||||
|
"site": "https://noveldeglace.com/",
|
||||||
|
"lang": "français, française",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/french/noveldeglace.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/fr/noveldeglace/icon.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bahasa Indonesia": [
|
||||||
|
{
|
||||||
|
"id": "meionovel",
|
||||||
|
"name": "MeioNovel[madara]",
|
||||||
|
"site": "https://meionovel.id/",
|
||||||
|
"lang": "Bahasa Indonesia",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/indonesian/MeioNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/meionovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "morenovel",
|
||||||
|
"name": "MoreNovel[madara]",
|
||||||
|
"site": "https://morenovel.net/",
|
||||||
|
"lang": "Bahasa Indonesia",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/indonesian/MoreNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/morenovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wbnovel",
|
||||||
|
"name": "WBNovel[madara]",
|
||||||
|
"site": "https://wbnovel.com/",
|
||||||
|
"lang": "Bahasa Indonesia",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/indonesian/WBNovel[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/wbnovel.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"日本語": [],
|
||||||
|
"Português": [
|
||||||
|
{
|
||||||
|
"id": "lightnovelbrasil",
|
||||||
|
"name": "Light Novel Brasil",
|
||||||
|
"site": "https://lightnovelbrasil.com/",
|
||||||
|
"lang": "Português",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/portuguese/lightnovelbrasil.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/wpmangastream/icons/lightnovelbrasil.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"русский язык": [
|
||||||
|
{
|
||||||
|
"id": "AT",
|
||||||
|
"name": "Автор Тудей",
|
||||||
|
"site": "https://author.today",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/authortoday.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/authortoday/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bookhamster",
|
||||||
|
"name": "Bookhamster[ifreedom]",
|
||||||
|
"site": "https://bookhamster.ru",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/Bookhamster[ifreedom].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/ifreedom/icons/bookhamster.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bookriver",
|
||||||
|
"name": "Bookriver",
|
||||||
|
"site": "https://bookriver.ru",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/bookriver.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/bookriver/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "erolate",
|
||||||
|
"name": "Erolate[rulate]",
|
||||||
|
"site": "https://erolate.com",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/Erolate[rulate].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/rulate/icons/erolate.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ficbook",
|
||||||
|
"name": "ficbook",
|
||||||
|
"site": "https://ficbook.net",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/ficbook.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/ficbook/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "freedlit.space",
|
||||||
|
"name": "LitSpace",
|
||||||
|
"site": "https://freedlit.space",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/LitSpace.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/freedlit/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ifreedom",
|
||||||
|
"name": "Свободный Мир Ранобэ[ifreedom]",
|
||||||
|
"site": "https://ifreedom.su",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/СвободныйМирРанобэ[ifreedom].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/ifreedom/icons/ifreedom.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "jaomix.ru",
|
||||||
|
"name": "Jaomix",
|
||||||
|
"site": "https://jaomix.ru",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/jaomix.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/jaomix/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ReN",
|
||||||
|
"name": "Renovels",
|
||||||
|
"site": "https://renovels.org",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/renovels.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/renovels/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "RLIB",
|
||||||
|
"name": "RanobeLib",
|
||||||
|
"site": "https://ranobelib.me",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/ranobelib.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/ranobelib/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "RNBH.org",
|
||||||
|
"name": "RanobeHub",
|
||||||
|
"site": "https://ranobehub.org/",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/ranobehub.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/ranobehub/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "RNRF",
|
||||||
|
"name": "РанобэРФ",
|
||||||
|
"site": "https://ранобэ.рф",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/ranoberf.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/ranoberf/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "TL",
|
||||||
|
"name": "NovelTL",
|
||||||
|
"site": "https://novel.tl",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/novelTL.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ru/noveltl/icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "tl.rulate",
|
||||||
|
"name": "Rulate[rulate]",
|
||||||
|
"site": "https://tl.rulate.ru",
|
||||||
|
"lang": "русский язык",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/russian/Rulate[rulate].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/rulate/icons/rulate.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"español, castellano": [
|
||||||
|
{
|
||||||
|
"id": "tunovelaligera",
|
||||||
|
"name": "TuNovelaLigera",
|
||||||
|
"site": "https://tunovelaligera.com/",
|
||||||
|
"lang": "español, castellano",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/spanish/tunovelaligera.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/es/tunovelaligera/icon.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Türkçe": [
|
||||||
|
{
|
||||||
|
"id": "lshnovel",
|
||||||
|
"name": "Liebe Schnee Hiver Novel",
|
||||||
|
"site": "https://lshnovel.com/",
|
||||||
|
"lang": "Türkçe",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/turkish/lshnovel.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/wpmangastream/icons/lshnovel.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "turkcelightnovels",
|
||||||
|
"name": "TurkceLightNovels[madara]",
|
||||||
|
"site": "https://turkcelightnovels.com/",
|
||||||
|
"lang": "Türkçe",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/turkish/TurkceLightNovels[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/turkcelightnovels.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "webnoveloku",
|
||||||
|
"name": "WebNovelOku [madara]",
|
||||||
|
"site": "https://www.webnoveloku.com/",
|
||||||
|
"lang": "Türkçe",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/turkish/WebNovelOku[madara].js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/multisrc/madara/icons/webnoveloku.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Україна": [
|
||||||
|
{
|
||||||
|
"id": "smakolykytl",
|
||||||
|
"name": "Смаколики",
|
||||||
|
"site": "https://smakolykytl.site/",
|
||||||
|
"lang": "Україна",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/ukraine/smakolykytl.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/ua/smakolykytl/icon.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Tiếng Việt": [
|
||||||
|
{
|
||||||
|
"id": "ln.hako",
|
||||||
|
"name": "Hako",
|
||||||
|
"site": "https://ln.hako.vn",
|
||||||
|
"lang": "Tiếng Việt",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"url": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/.js/plugins/vietnamese/LNHako.js",
|
||||||
|
"iconUrl": "https://raw.githubusercontent.com/skillgg/lnplugins/filters_redesign/icons/src/vi/hakolightnovel/icon.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -6,19 +6,6 @@ import express from "express";
|
|||||||
import bodyParser from "body-parser";
|
import bodyParser from "body-parser";
|
||||||
import * as pluginApi from "./test_web/api/plugins";
|
import * as pluginApi from "./test_web/api/plugins";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
interface GlobalState {
|
|
||||||
UserAgent?: string,
|
|
||||||
Cookie?: string,
|
|
||||||
}
|
|
||||||
let globalState: GlobalState = {
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getHeaders = () => {
|
|
||||||
return {
|
|
||||||
'User-Agent': globalState.UserAgent,
|
|
||||||
'Cookie': globalState.Cookie,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
@@ -26,14 +13,27 @@ const host = "localhost";
|
|||||||
|
|
||||||
const dirname = path.join(__dirname, "..");
|
const dirname = path.join(__dirname, "..");
|
||||||
|
|
||||||
|
export const getHeaders = () => {
|
||||||
|
return pluginApi.fetchHeaders;
|
||||||
|
};
|
||||||
|
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
globalState.UserAgent = req.headers["user-agent"];
|
const xHeaders = req.headers["x-custom-headers"];
|
||||||
console.log('---------');
|
if (xHeaders && typeof xHeaders === "string") {
|
||||||
console.log('default headers: ', globalState);
|
const headers = JSON.parse(xHeaders);
|
||||||
console.log('---------');
|
for (const [headerName, headerValue] of Object.entries(headers)) {
|
||||||
console.log();
|
if (
|
||||||
|
typeof headerName === "string" &&
|
||||||
|
typeof headerValue === "string"
|
||||||
|
)
|
||||||
|
pluginApi.fetchHeaders[headerName] = headerValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pluginApi.fetchHeaders.userAgent)
|
||||||
|
console.log("Custom headers: ", pluginApi.fetchHeaders);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
app.use("/static", express.static(path.join(dirname, "test_web", "static")));
|
app.use("/static", express.static(path.join(dirname, "test_web", "static")));
|
||||||
app.use("/icons", express.static(path.join(dirname, "icons")));
|
app.use("/icons", express.static(path.join(dirname, "icons")));
|
||||||
@@ -41,18 +41,10 @@ app.get("/all_plugins", (req, res) => {
|
|||||||
const allPlugins = pluginApi.all_plugins();
|
const allPlugins = pluginApi.all_plugins();
|
||||||
res.json(allPlugins);
|
res.json(allPlugins);
|
||||||
});
|
});
|
||||||
app.post("/add_cookie", async (req, res) => {
|
|
||||||
globalState.Cookie = req.body['cookie'];
|
|
||||||
console.log('---------');
|
|
||||||
console.log('default headers: ', globalState);
|
|
||||||
console.log('---------');
|
|
||||||
console.log();
|
|
||||||
res.json({});
|
|
||||||
});
|
|
||||||
app.post("/filters", async (req, res) => {
|
app.post("/filters", async (req, res) => {
|
||||||
const filters = await pluginApi.getFilter(req.body['pluginRequirePath']);
|
const filters = await pluginApi.getFilter(req.body["pluginRequirePath"]);
|
||||||
res.json(filters || []);
|
res.json(filters || []);
|
||||||
})
|
});
|
||||||
app.post("/popularNovels/", async (req, res) => {
|
app.post("/popularNovels/", async (req, res) => {
|
||||||
const filters = req.body["filters"] || {};
|
const filters = req.body["filters"] || {};
|
||||||
const showLatestNovels = req.body["showLatestNovels"] || false;
|
const showLatestNovels = req.body["showLatestNovels"] || false;
|
||||||
@@ -81,7 +73,7 @@ app.post("/parseChapter/", async (req, res) => {
|
|||||||
req.body["pluginRequirePath"],
|
req.body["pluginRequirePath"],
|
||||||
req.body["chapterUrl"]
|
req.body["chapterUrl"]
|
||||||
);
|
);
|
||||||
res.json(chapterText);
|
res.send(chapterText);
|
||||||
});
|
});
|
||||||
app.post("/fetchImage/", async (req, res) => {
|
app.post("/fetchImage/", async (req, res) => {
|
||||||
const base64 = await pluginApi.fetchImage(
|
const base64 = await pluginApi.fetchImage(
|
||||||
|
|||||||
+43
-22
@@ -1,48 +1,69 @@
|
|||||||
export async function fetchApi(
|
export async function fetchApi(
|
||||||
url: string,
|
url: string,
|
||||||
init?: {
|
init?: {
|
||||||
headers?: Record<string,string> | Headers;
|
headers?: Record<string, string> | Headers;
|
||||||
[x: string]: string | Record<string,string> | undefined | FormData | Headers;
|
[x: string]:
|
||||||
},
|
| string
|
||||||
|
| Record<string, string>
|
||||||
|
| undefined
|
||||||
|
| FormData
|
||||||
|
| Headers;
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
let defaultHeaders: {
|
let defaultHeaders: Record<string, string> = {};
|
||||||
'User-Agent'?: string,
|
|
||||||
'Cookie'?: string,
|
|
||||||
} = {};
|
|
||||||
try {
|
try {
|
||||||
const getHeaders = (await import('../index.js')).getHeaders;
|
const { getHeaders } = await import("../index.js");
|
||||||
defaultHeaders = getHeaders();
|
defaultHeaders = getHeaders();
|
||||||
}catch{
|
} catch {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
if (init?.headers) {
|
||||||
if(init?.headers) {
|
if (init.headers instanceof Headers) {
|
||||||
if(init.headers instanceof Headers){
|
for (const [name, value] of Object.entries(defaultHeaders)) {
|
||||||
if(!init.headers.get('User-Agent') && defaultHeaders['User-Agent']){
|
if (!init.headers.get(name)) init.headers.set(name, value);
|
||||||
init.headers.set('User-Agent', defaultHeaders['User-Agent']);
|
|
||||||
}
|
}
|
||||||
if(defaultHeaders.Cookie) {
|
} else {
|
||||||
init.headers.set('Cookie', defaultHeaders.Cookie);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
init.headers = {
|
init.headers = {
|
||||||
...defaultHeaders,
|
...defaultHeaders,
|
||||||
...init.headers,
|
...init.headers,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
init = {
|
init = {
|
||||||
...init,
|
...init,
|
||||||
headers: defaultHeaders
|
headers: defaultHeaders,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(url, init);
|
console.log(url, init);
|
||||||
return await fetch(url, init);
|
return await fetch(url, init);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fetchFile = async function (url: string, init?: RequestInit) {
|
export const fetchFile = async function (url: string, init?: RequestInit) {
|
||||||
if (!init) init = {};
|
if (!init) init = {};
|
||||||
|
let defaultHeaders: Record<string, string> = {};
|
||||||
|
try {
|
||||||
|
const { getHeaders } = await import("../index.js");
|
||||||
|
defaultHeaders = getHeaders();
|
||||||
|
} catch {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
if (init?.headers) {
|
||||||
|
if (init.headers instanceof Headers) {
|
||||||
|
for (const [name, value] of Object.entries(defaultHeaders)) {
|
||||||
|
if (!init.headers.get(name)) init.headers.set(name, value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
init.headers = {
|
||||||
|
...defaultHeaders,
|
||||||
|
...init.headers,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
init = {
|
||||||
|
...init,
|
||||||
|
headers: defaultHeaders,
|
||||||
|
};
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const res = await fetch(url, init);
|
const res = await fetch(url, init);
|
||||||
if (!res.ok) return undefined;
|
if (!res.ok) return undefined;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import { Plugin, isPlugin } from "@typings/plugin";
|
|||||||
import { Filters } from "@libs/filterInputs";
|
import { Filters } from "@libs/filterInputs";
|
||||||
const root = path.dirname(require?.main?.filename || "");
|
const root = path.dirname(require?.main?.filename || "");
|
||||||
|
|
||||||
|
export const fetchHeaders: Record<string, string> = {}
|
||||||
|
|
||||||
export const all_plugins = (): PluginList => {
|
export const all_plugins = (): PluginList => {
|
||||||
const res: PluginList = {};
|
const res: PluginList = {};
|
||||||
for (let languageEnglish in languages) {
|
for (let languageEnglish in languages) {
|
||||||
|
|||||||
+24
-13
@@ -50,16 +50,30 @@
|
|||||||
</script>
|
</script>
|
||||||
</nav>
|
</nav>
|
||||||
<div id="test-container">
|
<div id="test-container">
|
||||||
<div class="test-wrapper" id="add-cookie">
|
<div class="test-wrapper" id="headerChanger">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="cookie">Cookie 🍪</label> <span id="cookie-content"></span>
|
<div class="title">Headers</div>
|
||||||
<input type="email" class="form-control" id="cookie" aria-describedby="cookieHelp" placeholder="cf_clearance=abcxyzblalba">
|
<div id="headerinfos">
|
||||||
<small id="cookieHelp" class="form-text text-muted">Add cookie into headers to bypass cloudflare</small>
|
<div class="headerinfo" data-headername="User-Agent">
|
||||||
<button type="button" class="btn btn-primary" id="add-cookie-btn">Add</button>
|
<span class="headername" >User-Agent</span><b>:</b>
|
||||||
</div>
|
<span class="headervalue"></span>
|
||||||
|
</div>
|
||||||
|
<div class="headerinfo">
|
||||||
|
<span class="headername">Cookie</span><b>: </b>
|
||||||
|
<span class="headervalue" contenteditable="true" ></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button id="addheaderbtn" class="btn-secondary pl-1 pr-1">Add header</button>
|
||||||
|
<button id="copyascode" class="btn-secondary pl-1 pr-1">Copy as code</button>
|
||||||
|
<div id="headersnotcopied">Remember to copy the headers into the plugin file after changing them!</div>
|
||||||
|
<div id="headerscopied" display="none">Copied</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="test-wrapper" id="popularNovels">
|
<div class="test-wrapper" id="popularNovels">
|
||||||
<div class="modal-container">
|
<div class="title">
|
||||||
|
popularNovels
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block;" class="modal-container">
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#filtersModal">
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#filtersModal">
|
||||||
Filters
|
Filters
|
||||||
</button>
|
</button>
|
||||||
@@ -82,12 +96,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<button type="button" class="btn btn-primary popularNovels-btn">fetch</button>
|
||||||
popularNovels
|
<div class="spinner-border" role="status">
|
||||||
<button type="button" class="btn btn-primary popularNovels-btn">fetch</button>
|
<span class="sr-only">Loading...</span>
|
||||||
<div class="spinner-border" role="status">
|
|
||||||
<span class="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="novel-list">
|
<div class="novel-list">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
.darkmode {
|
.darkmode {
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
background-color: var(--main-bg);
|
background-color: var(--main-bg);
|
||||||
|
.headerinfo span[contenteditable="true"]{
|
||||||
|
border: 1px solid #fff2;
|
||||||
|
}
|
||||||
select,
|
select,
|
||||||
input {
|
input {
|
||||||
background-color: var(--main-bg);
|
background-color: var(--main-bg);
|
||||||
|
|||||||
@@ -228,6 +228,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#popularNovels,
|
#popularNovels,
|
||||||
|
#headerChanger,
|
||||||
#searchNovels,
|
#searchNovels,
|
||||||
#parseNovelAndChapters,
|
#parseNovelAndChapters,
|
||||||
#parseChapter,
|
#parseChapter,
|
||||||
@@ -237,6 +238,36 @@
|
|||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerinfo {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
span[contenteditable="true"] {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 3px 10px;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#headersnotcopied,
|
||||||
|
#headerscopied {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headersnotcopied {
|
||||||
|
color: red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headerscopied {
|
||||||
|
color: green;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headereditbutton {
|
||||||
|
margin-left: 5px;
|
||||||
|
border: none;
|
||||||
|
padding-inline: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#popularNovels,
|
#popularNovels,
|
||||||
#searchNovels {
|
#searchNovels {
|
||||||
height: 350px;
|
height: 350px;
|
||||||
|
|||||||
+139
-27
@@ -45,6 +45,40 @@ const plugin_search = $("#plugin");
|
|||||||
/** @type {JQuery<HTMLDivElement>} */
|
/** @type {JQuery<HTMLDivElement>} */
|
||||||
const search_results = $("#search-results");
|
const search_results = $("#search-results");
|
||||||
|
|
||||||
|
const getHeaders = () => {
|
||||||
|
/** @type {Record<string,string>} */
|
||||||
|
const headers = {};
|
||||||
|
const els = document.querySelectorAll(".headerinfo").forEach((el) => {
|
||||||
|
/** @type {HTMLSpanElement | null} */
|
||||||
|
const nameSpan = el.querySelector(".headername");
|
||||||
|
/** @type {HTMLSpanElement | null} */
|
||||||
|
const valueSpan = el.querySelector(".headervalue");
|
||||||
|
if (nameSpan && valueSpan) {
|
||||||
|
const { innerText: name } = nameSpan;
|
||||||
|
const { innerText: value } = valueSpan;
|
||||||
|
if (typeof name === "string" && typeof value === "string") {
|
||||||
|
headers[name] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return headers;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} path
|
||||||
|
* @param {RequestInit | undefined} init
|
||||||
|
*/
|
||||||
|
const fetchFromAPI = async (path, init = undefined) => {
|
||||||
|
if (init) {
|
||||||
|
init.headers = {
|
||||||
|
...init.headers,
|
||||||
|
"x-custom-headers": JSON.stringify(getHeaders()),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return fetch(path, init);
|
||||||
|
};
|
||||||
|
|
||||||
const loadPluginsIntoSearchBar = () => {
|
const loadPluginsIntoSearchBar = () => {
|
||||||
const { language, keyword } = state.plugin_search;
|
const { language, keyword } = state.plugin_search;
|
||||||
const plugins = language ? state.all_plugins[language] : state.plugin_infos;
|
const plugins = language ? state.all_plugins[language] : state.plugin_infos;
|
||||||
@@ -59,7 +93,7 @@ const loadPluginsIntoSearchBar = () => {
|
|||||||
: plugins;
|
: plugins;
|
||||||
};
|
};
|
||||||
|
|
||||||
fetch("/all_plugins")
|
fetchFromAPI("/all_plugins")
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((/** @type {PluginList} */ all) => {
|
.then((/** @type {PluginList} */ all) => {
|
||||||
state.all_plugins = all;
|
state.all_plugins = all;
|
||||||
@@ -410,7 +444,7 @@ class PluginWrapper {
|
|||||||
try {
|
try {
|
||||||
/** @type {Filters} */
|
/** @type {Filters} */
|
||||||
const filters = await (
|
const filters = await (
|
||||||
await fetch("/filters", {
|
await fetchFromAPI("/filters", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -548,7 +582,7 @@ class PluginWrapper {
|
|||||||
try {
|
try {
|
||||||
/** @type {NovelItem[] | {error:string}} */
|
/** @type {NovelItem[] | {error:string}} */
|
||||||
const novels = await (
|
const novels = await (
|
||||||
await fetch(`/popularNovels/`, {
|
await fetchFromAPI(`/popularNovels/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -592,7 +626,7 @@ class PluginWrapper {
|
|||||||
try {
|
try {
|
||||||
/** @type {NovelItem[] | {error:string}} */
|
/** @type {NovelItem[] | {error:string}} */
|
||||||
const novels = await (
|
const novels = await (
|
||||||
await fetch(`/searchNovels/`, {
|
await fetchFromAPI(`/searchNovels/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -633,7 +667,7 @@ class PluginWrapper {
|
|||||||
try {
|
try {
|
||||||
/** @type {SourceNovel | {error:string}} */
|
/** @type {SourceNovel | {error:string}} */
|
||||||
const sourceNovel = await (
|
const sourceNovel = await (
|
||||||
await fetch(`/parseNovelAndChapters/`, {
|
await fetchFromAPI(`/parseNovelAndChapters/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -687,7 +721,7 @@ class PluginWrapper {
|
|||||||
spinner.show();
|
spinner.show();
|
||||||
try {
|
try {
|
||||||
const chapterText = await (
|
const chapterText = await (
|
||||||
await fetch(`/parseChapter/`, {
|
await fetchFromAPI(`/parseChapter/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -898,7 +932,7 @@ class PluginWrapper {
|
|||||||
spinner.show();
|
spinner.show();
|
||||||
try {
|
try {
|
||||||
const base64 = await (
|
const base64 = await (
|
||||||
await fetch(`/fetchImage/`, {
|
await fetchFromAPI(`/fetchImage/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -922,23 +956,6 @@ class PluginWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#add-cookie-btn").on("click", () => {
|
|
||||||
const cookie = $('#cookie').val();
|
|
||||||
fetch('/add_cookie', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
'cookie': cookie,
|
|
||||||
}),
|
|
||||||
}).then(() => {
|
|
||||||
$('#cookie').val('');
|
|
||||||
$('#cookie-content').text(`: ${cookie}`);
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
$(".popularNovels-btn").on("click", () =>
|
$(".popularNovels-btn").on("click", () =>
|
||||||
state.current_plugin?.getPopularNovels()
|
state.current_plugin?.getPopularNovels()
|
||||||
);
|
);
|
||||||
@@ -954,6 +971,93 @@ $(".parseNovelAndChapters-btn").on("click", () =>
|
|||||||
$(".parseChapter-btn").on("click", () => state.current_plugin?.getChapter());
|
$(".parseChapter-btn").on("click", () => state.current_plugin?.getChapter());
|
||||||
$(".fetchImage-btn").on("click", () => state.current_plugin?.fetchImage());
|
$(".fetchImage-btn").on("click", () => state.current_plugin?.fetchImage());
|
||||||
|
|
||||||
|
/** @type {Record<string,string>} */
|
||||||
|
let lastCopiedHeaders = {};
|
||||||
|
|
||||||
|
const checkIfHeadersChanged = () => {
|
||||||
|
const currentHeaders = getHeaders();
|
||||||
|
|
||||||
|
const headers = new Set(Object.keys(currentHeaders));
|
||||||
|
// quick exit if all custom headers removed
|
||||||
|
if (headers.size <= 2) {
|
||||||
|
$("#headersnotcopied").css({ display: "none" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get a list of all headers
|
||||||
|
for (const headername of Object.keys(lastCopiedHeaders)) {
|
||||||
|
headers.add(headername);
|
||||||
|
}
|
||||||
|
|
||||||
|
headers.delete("Cookie");
|
||||||
|
headers.delete("User-Agent");
|
||||||
|
|
||||||
|
let headersChanged = false;
|
||||||
|
// check if they're all the same
|
||||||
|
for (const headername of Array.from(headers)) {
|
||||||
|
if (currentHeaders[headername] !== lastCopiedHeaders[headername])
|
||||||
|
headersChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (headersChanged) $("#headersnotcopied").css({ display: "block" });
|
||||||
|
else $("#headersnotcopied").css({ display: "none" });
|
||||||
|
};
|
||||||
|
|
||||||
|
// get all header inputs and check if headers changed after
|
||||||
|
$(".headerinfo > span[contenteditable='true']").each((_, inputElement) => {
|
||||||
|
$(inputElement).on("input", checkIfHeadersChanged);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#addheaderbtn").on("click", () => {
|
||||||
|
/**
|
||||||
|
<div class="headerinfo" data-headername="Cookie">
|
||||||
|
<span class="headername" onclick="this.nextElementSibling.nextElementSibling.focus()">Cookie</span><b>: </b>
|
||||||
|
<span class="headervalue" contenteditable="true" ></span>
|
||||||
|
</div>
|
||||||
|
*/
|
||||||
|
const nameSpan = $("<span>").addClass("headername");
|
||||||
|
const valueSpan = $("<span>").addClass("headervalue");
|
||||||
|
const separator = $("<b>").html(": ");
|
||||||
|
const clearButton = $("<button>")
|
||||||
|
.text("Clear")
|
||||||
|
.addClass("headereditbutton")
|
||||||
|
.on("click", () => {
|
||||||
|
valueSpan.text("");
|
||||||
|
checkIfHeadersChanged();
|
||||||
|
});
|
||||||
|
const removeButton = $("<button>")
|
||||||
|
.text("Remove")
|
||||||
|
.addClass("headereditbutton");
|
||||||
|
nameSpan[0].contentEditable = "true";
|
||||||
|
valueSpan[0].contentEditable = "true";
|
||||||
|
nameSpan.on("input", checkIfHeadersChanged);
|
||||||
|
valueSpan.on("input", checkIfHeadersChanged);
|
||||||
|
const headerinfo = $("<div>")
|
||||||
|
.append(nameSpan, separator, valueSpan, clearButton, removeButton)
|
||||||
|
.attr("class", "headerinfo");
|
||||||
|
removeButton.on("click", () => {
|
||||||
|
headerinfo.remove();
|
||||||
|
checkIfHeadersChanged();
|
||||||
|
});
|
||||||
|
$("#headerinfos").append(headerinfo);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#copyascode").on("click", async () => {
|
||||||
|
const headers = getHeaders();
|
||||||
|
const strippedHeaders = {
|
||||||
|
...headers,
|
||||||
|
};
|
||||||
|
delete strippedHeaders["Cookie"];
|
||||||
|
delete strippedHeaders["User-Agent"];
|
||||||
|
await navigator.clipboard.writeText(
|
||||||
|
JSON.stringify(strippedHeaders, null, 4)
|
||||||
|
);
|
||||||
|
lastCopiedHeaders = headers;
|
||||||
|
checkIfHeadersChanged();
|
||||||
|
$("#headerscopied").css({ display: "block" });
|
||||||
|
setTimeout(() => $("#headerscopied").css({ display: "none" }), 1000);
|
||||||
|
});
|
||||||
|
|
||||||
const currentWrapper = () => state.current_plugin || emptyPluginWrapper;
|
const currentWrapper = () => state.current_plugin || emptyPluginWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1088,20 +1192,26 @@ const refreshPreviewSettings = () => {
|
|||||||
|
|
||||||
// JQuery document.body.onload
|
// JQuery document.body.onload
|
||||||
$(() => {
|
$(() => {
|
||||||
|
/** @type {JQuery<HTMLSpanElement>} */
|
||||||
|
const userAgentInput = $('[data-headername="User-Agent"] .headervalue');
|
||||||
|
if (userAgentInput.length) {
|
||||||
|
userAgentInput.text(navigator.userAgent);
|
||||||
|
}
|
||||||
|
// TODO read the values from localstorage
|
||||||
state.plugin_search.keyword = plugin_search[0].value;
|
state.plugin_search.keyword = plugin_search[0].value;
|
||||||
PluginWrapper.previewSettings.sanitize = false;
|
PluginWrapper.previewSettings.sanitize = false;
|
||||||
Promise.allSettled([
|
Promise.allSettled([
|
||||||
fetch("static/html/template.html")
|
fetchFromAPI("static/html/template.html")
|
||||||
.then((r) => r.text())
|
.then((r) => r.text())
|
||||||
.then((t) => {
|
.then((t) => {
|
||||||
PluginWrapper.previewSettings.htmlTemplate = t;
|
PluginWrapper.previewSettings.htmlTemplate = t;
|
||||||
}),
|
}),
|
||||||
fetch(
|
fetchFromAPI(
|
||||||
"https://raw.githubusercontent.com/LNReader/lnreader/plugins/android/app/src/main/assets/css/index.css"
|
"https://raw.githubusercontent.com/LNReader/lnreader/plugins/android/app/src/main/assets/css/index.css"
|
||||||
)
|
)
|
||||||
.then((r) => r.text())
|
.then((r) => r.text())
|
||||||
.then((t) => (PluginWrapper.previewSettings.fillCSS = t)),
|
.then((t) => (PluginWrapper.previewSettings.fillCSS = t)),
|
||||||
fetch(
|
fetchFromAPI(
|
||||||
"https://raw.githubusercontent.com/LNReader/lnreader/plugins/android/app/src/main/assets/js/index.js"
|
"https://raw.githubusercontent.com/LNReader/lnreader/plugins/android/app/src/main/assets/js/index.js"
|
||||||
)
|
)
|
||||||
.then((r) => r.text())
|
.then((r) => r.text())
|
||||||
@@ -1132,4 +1242,6 @@ $(() => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
refreshPreviewSettings();
|
refreshPreviewSettings();
|
||||||
|
lastCopiedHeaders = getHeaders();
|
||||||
|
checkIfHeadersChanged();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user