Improvement: added novelupdates css (#1029)
* novel-updates: added customCSS * novel-updates: update version * novel-updates: customCSS fix * novel-updates: customCSS fix * novel-updates: version update * novel-updates: css update * novel-updates: version update * novel-updates: css update * genesis: added `genesistudio`
This commit is contained in:
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* Novel Updates -> Genesis Translations
|
||||
* https://www.novelupdates.com/group/genesis-translations/
|
||||
* Necessary to display chapterContent correctly
|
||||
*/
|
||||
.game-prompt-gold-info {
|
||||
min-width: 230px;
|
||||
padding: 20px;
|
||||
box-sizing: content-box;
|
||||
width: fit-content;
|
||||
margin: 15px auto;
|
||||
border: solid #e0cc00;
|
||||
box-shadow: 0 0 10px 1px #e0cc00;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
}
|
||||
.game-prompt-gold-info-title {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
text-shadow: -1px 5px 13px #e0cc00, -1px 0px 10px #544d00;
|
||||
border-bottom: 3px solid #fff;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.game-prompt-gold-info-content {
|
||||
text-shadow: -1px 5px 13px #e0cc00, -1px 0px 10px #e0cc00;
|
||||
color: #fff;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.game-prompt-info {
|
||||
min-width: 230px;
|
||||
padding: 20px;
|
||||
box-sizing: content-box;
|
||||
width: fit-content;
|
||||
margin: 15px auto;
|
||||
border: solid #00219b;
|
||||
box-shadow: 0 0 10px 1px #00219b;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
}
|
||||
.game-prompt-info-title {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
text-shadow: -1px 5px 13px #004fff, -1px 0px 10px #002775;
|
||||
border-bottom: 3px solid #fff;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.game-prompt-info-content {
|
||||
text-shadow: -1px 5px 13px #004fff, -1px 0px 10px #002775;
|
||||
color: #fff;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.game-prompt-info-small {
|
||||
min-width: 230px;
|
||||
max-width: fit-content;
|
||||
padding: 10px 30px 10px 30px;
|
||||
margin: 15px auto;
|
||||
border: solid #00219b;
|
||||
box-shadow: 0 0 10px 1px #00219b;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
}
|
||||
.game-prompt-info-small-content {
|
||||
text-shadow: -1px 5px 13px #004fff, -1px 0px 10px #002775;
|
||||
color: #fff;
|
||||
}
|
||||
.game-prompt-silver-info {
|
||||
min-width: 230px;
|
||||
padding: 20px;
|
||||
box-sizing: content-box;
|
||||
width: fit-content;
|
||||
margin: 15px auto;
|
||||
border: solid #c2c2c2;
|
||||
box-shadow: 0 0 10px 1px #737373;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
}
|
||||
.game-prompt-silver-info-content {
|
||||
text-shadow: -1px 5px 13px #b4b4b4, -1px 0px 10px #737373;
|
||||
color: #fff;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.game-prompt-warning {
|
||||
min-width: 230px;
|
||||
padding: 20px;
|
||||
box-sizing: content-box;
|
||||
width: fit-content;
|
||||
margin: 15px auto;
|
||||
border: solid #750b00e3;
|
||||
box-shadow: 0 0 20px 3px #750b0070;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
}
|
||||
.game-prompt-warning-title {
|
||||
color: #ff4348;
|
||||
font-weight: bold;
|
||||
text-shadow: -1px 5px 13px #ff230c, -1px 0px 10px #750b00;
|
||||
border-bottom: 3px solid #fff;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.game-prompt-warning-content {
|
||||
text-shadow: -1px 5px 13px #ff230c, -1px 0px 10px #750b00;
|
||||
color: #fff;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.ta-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/**
|
||||
* Novel Updates -> Raei Translations
|
||||
* https://www.novelupdates.com/group/raei-translations/
|
||||
* Necessary to display chapterContent correctly
|
||||
*/
|
||||
.status {
|
||||
--color-special: #ff751a;
|
||||
--color-special-light: #ffa970;
|
||||
border-left: ridge 4px var(--color-special);
|
||||
padding: 1em;
|
||||
color: var(--color-special-light);
|
||||
box-shadow: -5px 0 4px -5px var(--color-special);
|
||||
margin-top: 2em;
|
||||
margin-bottom: 2em;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/**
|
||||
* Novel Updates -> Sky Demon Order
|
||||
* https://www.novelupdates.com/group/sky-demon-order/
|
||||
* Necessary to display chapterContent correctly
|
||||
*/
|
||||
.novel-system-box {
|
||||
--colors-novel-system-box-bg-1: 0 2 20;
|
||||
--colors-novel-system-box-bg-2: 34 40 93;
|
||||
--colors-novel-system-box-border: 137 149 199;
|
||||
--colors-novel-system-box-shadow: 9 23 134;
|
||||
background: linear-gradient(180deg,rgb(var(--colors-novel-system-box-bg-1)) 35%,rgb(var(--colors-novel-system-box-bg-2)) 214%);
|
||||
border: 1px solid rgb(var(--colors-novel-system-box-border));
|
||||
color: #fffffd;
|
||||
/*font-family: Rajdhani,serif;*/
|
||||
font-weight: 500;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
text-shadow: 1px 1px 2px rgb(var(--colors-novel-system-box-shadow)),0 0 1em rgb(var(--colors-novel-system-box-shadow)),0 0 .2em rgb(var(--colors-novel-system-box-shadow));
|
||||
width: fit-content;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* Novel Updates -> FictionRead
|
||||
* https://www.novelupdates.com/group/fictionread/
|
||||
* Necessary to display chapterContent correctly
|
||||
*/
|
||||
.letter-style {
|
||||
min-width: 230px;
|
||||
max-width: fit-content;
|
||||
margin: 15px auto;
|
||||
box-shadow: 0 0 10px 1px #5e636e;
|
||||
border-radius: 5px;
|
||||
/*font-family: 'Oswald', sans-serif;*/
|
||||
background-color: #000000;
|
||||
padding: 10px 30px 10px 30px;
|
||||
}
|
||||
.system {
|
||||
background: linear-gradient(33deg, #334455 0%, #223344 100%);
|
||||
border: 1px solid #aabbcc;
|
||||
color: #fffffd;
|
||||
/*font-family: Rajdhani,serif;*/
|
||||
font-weight: 500;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
width: fit-content;
|
||||
}
|
||||
@@ -7,8 +7,9 @@ import { Plugin } from '@typings/plugin';
|
||||
class NovelUpdates implements Plugin.PluginBase {
|
||||
id = 'novelupdates';
|
||||
name = 'Novel Updates';
|
||||
version = '0.6.1';
|
||||
version = '0.7.1';
|
||||
icon = 'src/en/novelupdates/icon.png';
|
||||
customCSS = 'src/en/novelupdates/customCSS.css';
|
||||
site = 'https://www.novelupdates.com/';
|
||||
|
||||
parseNovels(loadedCheerio: CheerioAPI) {
|
||||
@@ -44,11 +45,11 @@ class NovelUpdates implements Plugin.PluginBase {
|
||||
): Promise<Plugin.NovelItem[]> {
|
||||
let link = `${this.site}`;
|
||||
if (
|
||||
filters.language.value.length ||
|
||||
filters.novelType.value.length ||
|
||||
filters.genres.value.include?.length ||
|
||||
filters.genres.value.exclude?.length ||
|
||||
filters.storyStatus.value !== ''
|
||||
filters?.language.value.length ||
|
||||
filters?.novelType.value.length ||
|
||||
filters?.genres.value.include?.length ||
|
||||
filters?.genres.value.exclude?.length ||
|
||||
filters?.storyStatus.value !== ''
|
||||
) {
|
||||
link += 'series-finder/?sf=1';
|
||||
} else if (showLatestNovels) {
|
||||
@@ -57,30 +58,30 @@ class NovelUpdates implements Plugin.PluginBase {
|
||||
link += 'series-ranking/?rank=week';
|
||||
}
|
||||
|
||||
if (filters.language.value.length)
|
||||
if (filters?.language.value.length)
|
||||
link += '&org=' + filters.language.value.join(',');
|
||||
|
||||
if (filters.novelType.value.length)
|
||||
if (filters?.novelType.value.length)
|
||||
link += '&nt=' + filters.novelType.value.join(',');
|
||||
|
||||
if (filters.genres.value.include?.length)
|
||||
if (filters?.genres.value.include?.length)
|
||||
link += '&gi=' + filters.genres.value.include.join(',');
|
||||
|
||||
if (filters.genres.value.exclude?.length)
|
||||
if (filters?.genres.value.exclude?.length)
|
||||
link += '&ge=' + filters.genres.value.exclude.join(',');
|
||||
|
||||
if (
|
||||
filters.genres.value.include?.length ||
|
||||
filters.genres.value.exclude?.length
|
||||
filters?.genres.value.include?.length ||
|
||||
filters?.genres.value.exclude?.length
|
||||
)
|
||||
link += '&mgi=' + filters.genre_operator.value;
|
||||
|
||||
if (filters.storyStatus.value.length)
|
||||
if (filters?.storyStatus.value.length)
|
||||
link += '&ss=' + filters.storyStatus.value;
|
||||
|
||||
link += '&sort=' + filters.sort.value;
|
||||
link += '&sort=' + filters?.sort.value;
|
||||
|
||||
link += '&order=' + filters.order.value;
|
||||
link += '&order=' + filters?.order.value;
|
||||
|
||||
link += '&pg=' + page;
|
||||
|
||||
@@ -229,6 +230,16 @@ class NovelUpdates implements Plugin.PluginBase {
|
||||
chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`;
|
||||
}
|
||||
break;
|
||||
case 'genesistudio':
|
||||
const url_genesis = `${url}/__data.json?x-sveltekit-invalidated=001`;
|
||||
const json_genesis = await fetchApi(url_genesis).then(r => r.json());
|
||||
|
||||
const nodes_genesis = json_genesis.nodes;
|
||||
const data_genesis = nodes_genesis
|
||||
.filter((node: { type: string }) => node.type === 'data')
|
||||
.map((node: { data: any }) => node.data)[0];
|
||||
chapterText = data_genesis[data_genesis[0].content];
|
||||
break;
|
||||
case 'helscans':
|
||||
chapterTitle = loadedCheerio('.entry-title-main').first().text()!;
|
||||
const chapterStringHelScans =
|
||||
|
||||
Reference in New Issue
Block a user