Improvement: Novel Updates: Arcane Translations CSS Additions (#1451)

* novel_updates: added GreenzTL

* novel_updates: fix skydemonorder

* novel_updates: add styles to arcanetranslations

* novel_updates: revert version change

* novel_updates: update arcanetranslations

* novel_updates: fix white box

* novel_updates: revert version
This commit is contained in:
Batorian
2025-01-23 09:56:25 +01:00
committed by GitHub
parent ca09c31537
commit 6670dfcbd8
2 changed files with 44 additions and 20 deletions
@@ -14,6 +14,15 @@
z-index: 1; z-index: 1;
} }
.arcane_box_white {
display: block;
text-align: center;
border: 2px solid white;
padding: 20px;
box-shadow: 0 0 10px white;
background-color: black;
}
.arcane_title_blue { .arcane_title_blue {
color: white; color: white;
font-weight: bold; font-weight: bold;
@@ -29,6 +38,16 @@
text-shadow: 0 0 8px blue; text-shadow: 0 0 8px blue;
} }
.arcane_text_lightyellow {
color: white;
text-shadow: 0 0 8px lightyellow;
font-family: 'Amita', cursive;
}
.arcane_text_pink {
color: #ff00ff;
}
/** /**
* Novel Updates -> Daoist Quest * Novel Updates -> Daoist Quest
* https://www.novelupdates.com/group/daoist-quest/ * https://www.novelupdates.com/group/daoist-quest/
+25 -20
View File
@@ -6,7 +6,7 @@ import { Plugin } from '@typings/plugin';
class NovelUpdates implements Plugin.PluginBase { class NovelUpdates implements Plugin.PluginBase {
id = 'novelupdates'; id = 'novelupdates';
name = 'Novel Updates'; name = 'Novel Updates';
version = '0.7.13'; version = '0.7.14';
icon = 'src/en/novelupdates/icon.png'; icon = 'src/en/novelupdates/icon.png';
customCSS = 'src/en/novelupdates/customCSS.css'; customCSS = 'src/en/novelupdates/customCSS.css';
site = 'https://www.novelupdates.com/'; site = 'https://www.novelupdates.com/';
@@ -211,32 +211,37 @@ class NovelUpdates implements Plugin.PluginBase {
chapterContent = loadedCheerio('#spliced-comic').html()!; chapterContent = loadedCheerio('#spliced-comic').html()!;
chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`; chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`;
break; break;
// Last edited in 0.7.13 - 21/01/2025 // Last edited in 0.7.14 - 22/01/2025
case 'arcanetranslations': case 'arcanetranslations':
bloatElements = ['.bottomnav']; bloatElements = ['.bottomnav'];
bloatElements.forEach(tag => loadedCheerio(tag).remove()); bloatElements.forEach(tag => loadedCheerio(tag).remove());
chapterTitle = loadedCheerio('.epwrapper .cat-series').first().text(); chapterTitle = loadedCheerio('.epwrapper .cat-series').first().text();
loadedCheerio('.entry-content div').each((_, element) => { loadedCheerio('.entry-content div, .entry-content span').each(
const el = loadedCheerio(element); (_, element) => {
const style = el.attr('style'); const el = loadedCheerio(element);
const style = el.attr('style');
if (!style) return; // Skip elements without inline styles if (!style) return; // Skip elements without inline styles
// Check for specific styles if (/border:.*#00219b/.test(style)) {
if (/border:.*#00219b/.test(style)) { el.removeAttr('style').addClass('arcane_box_blue'); // Blue box
// Check if 'border' contains '#00219b' } else if (/border:.*white/.test(style)) {
el.removeAttr('style').addClass('arcane_box_blue'); el.removeAttr('style').addClass('arcane_box_white'); // White box
} else if ( } else if (
style.includes('text-transform: uppercase') && style.includes('text-transform: uppercase') &&
/text-shadow:.*blue/.test(style) // Check if 'text-shadow' contains 'blue' /text-shadow:.*blue/.test(style)
) { ) {
el.removeAttr('style').addClass('arcane_title_blue'); el.removeAttr('style').addClass('arcane_title_blue'); // Blue title
} else if (/text-shadow:.*blue/.test(style)) { } else if (/text-shadow:.*blue/.test(style)) {
// Check if 'text-shadow' contains 'blue' el.removeAttr('style').addClass('arcane_text_blue'); // Blue text
el.removeAttr('style').addClass('arcane_text_blue'); } else if (/text-shadow:.*lightyellow/.test(style)) {
} el.removeAttr('style').addClass('arcane_text_lightyellow'); // Lightyellow text
}); } else if (/color:.*#ff00ff/.test(style)) {
el.removeAttr('style').addClass('arcane_text_pink'); // Pink text
}
},
);
chapterContent = loadedCheerio('.entry-content').html()!; chapterContent = loadedCheerio('.entry-content').html()!;
chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`; chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`;