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:
@@ -14,6 +14,15 @@
|
||||
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 {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
@@ -29,6 +38,16 @@
|
||||
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
|
||||
* https://www.novelupdates.com/group/daoist-quest/
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Plugin } from '@typings/plugin';
|
||||
class NovelUpdates implements Plugin.PluginBase {
|
||||
id = 'novelupdates';
|
||||
name = 'Novel Updates';
|
||||
version = '0.7.13';
|
||||
version = '0.7.14';
|
||||
icon = 'src/en/novelupdates/icon.png';
|
||||
customCSS = 'src/en/novelupdates/customCSS.css';
|
||||
site = 'https://www.novelupdates.com/';
|
||||
@@ -211,32 +211,37 @@ class NovelUpdates implements Plugin.PluginBase {
|
||||
chapterContent = loadedCheerio('#spliced-comic').html()!;
|
||||
chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`;
|
||||
break;
|
||||
// Last edited in 0.7.13 - 21/01/2025
|
||||
// Last edited in 0.7.14 - 22/01/2025
|
||||
case 'arcanetranslations':
|
||||
bloatElements = ['.bottomnav'];
|
||||
bloatElements.forEach(tag => loadedCheerio(tag).remove());
|
||||
chapterTitle = loadedCheerio('.epwrapper .cat-series').first().text();
|
||||
|
||||
loadedCheerio('.entry-content div').each((_, element) => {
|
||||
const el = loadedCheerio(element);
|
||||
const style = el.attr('style');
|
||||
loadedCheerio('.entry-content div, .entry-content span').each(
|
||||
(_, element) => {
|
||||
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)) {
|
||||
// Check if 'border' contains '#00219b'
|
||||
el.removeAttr('style').addClass('arcane_box_blue');
|
||||
} else if (
|
||||
style.includes('text-transform: uppercase') &&
|
||||
/text-shadow:.*blue/.test(style) // Check if 'text-shadow' contains 'blue'
|
||||
) {
|
||||
el.removeAttr('style').addClass('arcane_title_blue');
|
||||
} else if (/text-shadow:.*blue/.test(style)) {
|
||||
// Check if 'text-shadow' contains 'blue'
|
||||
el.removeAttr('style').addClass('arcane_text_blue');
|
||||
}
|
||||
});
|
||||
if (/border:.*#00219b/.test(style)) {
|
||||
el.removeAttr('style').addClass('arcane_box_blue'); // Blue box
|
||||
} else if (/border:.*white/.test(style)) {
|
||||
el.removeAttr('style').addClass('arcane_box_white'); // White box
|
||||
} else if (
|
||||
style.includes('text-transform: uppercase') &&
|
||||
/text-shadow:.*blue/.test(style)
|
||||
) {
|
||||
el.removeAttr('style').addClass('arcane_title_blue'); // Blue title
|
||||
} else if (/text-shadow:.*blue/.test(style)) {
|
||||
el.removeAttr('style').addClass('arcane_text_blue'); // Blue text
|
||||
} 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()!;
|
||||
chapterText = `<h2>${chapterTitle}</h2><hr><br>${chapterContent}`;
|
||||
|
||||
Reference in New Issue
Block a user