fix line break issue
This commit is contained in:
@ -15,8 +15,6 @@ copy_rules:
|
||||
target: './bc8d51405ec040305a87.ico'
|
||||
- source: './img/favicon.ico'
|
||||
target: './favicon.ico'
|
||||
- source: './img/favicon.png'
|
||||
target: './assets/img/favicon.png'
|
||||
|
||||
mode: 'replace' # Überschreibt vorhandene Dateien/Ordner
|
||||
|
||||
@ -25,11 +23,14 @@ copy_rules:
|
||||
- sources:
|
||||
- './seasonals'
|
||||
- './ui'
|
||||
- './pictures'
|
||||
|
||||
- source: './img/background.png'
|
||||
target: './assets/img/background.png'
|
||||
- source: './img/logo.png'
|
||||
target: './assets/img/logo.png'
|
||||
- source: './img/favicon.png'
|
||||
target: './assets/img/favicon.png'
|
||||
mode: 'copy' # Kopiert Dateien/Ordner
|
||||
|
||||
# Modifikationsregeln
|
||||
@ -52,7 +53,7 @@ modification_rules:
|
||||
insert_text: >
|
||||
<script>document.addEventListener("DOMContentLoaded", function () { if (document.title === "Jellyfin") { document.title = "SpaceCloud - Cinema"; } const observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { if (mutation.type === 'childList') { if (document.title === "Jellyfin") { document.title = "SpaceCloud - Cinema"; } } }); }); observer.observe(document.querySelector('title'), { childList: true }); Object.defineProperty(document, 'title', { set: function (value) { if (value === "Jellyfin") { document.querySelector('title').textContent = "SpaceCloud - Cinema"; } else { document.querySelector('title').textContent = value; } }, get: function () { return document.querySelector('title').textContent; } }); });</script>
|
||||
<script>const createRequestTab = () => {const title = document.createElement("div");title.classList.add("emby-button-foreground");title.innerText = "Anfragen";const button = document.createElement("button");button.type = "button";button.is = "empty-button";button.classList.add("emby-tab-button", "emby-button", "lastFocused");button.setAttribute("data-index", "2");button.setAttribute("id", "requestTab");button.appendChild(title);(function e() {const tabb = document.querySelector(".emby-tabs-slider");tabb ? !document.querySelector("#requestTab") && tabb.appendChild(button) : setTimeout(e, 500)})();}</script>
|
||||
|
||||
|
||||
replace_rules:
|
||||
# Page title
|
||||
- old_text: '<title>Jellyfin</title>'
|
||||
@ -78,7 +79,7 @@ modification_rules:
|
||||
- after_text: 'data-backdroptype="movie,series,book">'
|
||||
insert_text: >
|
||||
<style> .featurediframe {width: 95vw; height: 24em; display: block; border: 0; margin: -1em auto 0;} @media (min-width: 2100px) {.featurediframe {height: 33em;}} @media (max-width: 1599px) {.featurediframe {margin-top: 1.2em;}} @media (max-width: 800px) {.featurediframe {margin-top: 0.8em; height: 25em;}} </style> <iframe class="featurediframe" src="/web/ui/spotlight.html"></iframe>
|
||||
<style>:root { --save-gut: max(env(safe-area-inset-left), .3%) } .requestIframe { margin: 0 .4em; padding: 0 var(--save-gut); width: calc(100% - (.4em * 2) - (var(--save-gut) * 2)); height: 90vh; border: none; position: absolute; top: 5.3em } @media (max-width: 1599px) { .requestIframe { height: 83vh; top: 8.2em; } }</style><script>setTimeout(() => { createRequestTab() }, 500)</script>
|
||||
<style>:root { --save-gut: max(env(safe-area-inset-left), .3%) } .requestIframe { margin: 0 .4em; padding: 0 var(--save-gut); width: calc(100% - (.4em * 2) - (var(--save-gut) * 2)); height: 90vh; border: none; position: absolute; top: 5.3em } @media (max-width: 1599px) { .requestIframe { height: 83vh; top: 8.2em; } }</style><script>setTimeout(() => { createRequestTab() }, 500)</script>
|
||||
|
||||
# request tab on main page
|
||||
- after_text: 'id="favoritesTab" data-index="1"> <div class="sections"></div> </div>'
|
||||
|
@ -174,7 +174,8 @@ def modifyFiles(config, destinationDirectory):
|
||||
raise ValueError(f"Text '{after_text}' not found in file: {filePath}")
|
||||
elif insert_text not in content:
|
||||
print(f" {Colors.GREEN}Inserting text after: {after_text} {Colors.YELLOW}+ ->{Colors.GREEN} {insert_text}{Colors.RESET}")
|
||||
content = content.replace(after_text, after_text + insert_text)
|
||||
# content = content.replace(after_text, after_text + insert_text)
|
||||
content = content.replace(after_text, after_text + insert_text.replace('\n', ''))
|
||||
else:
|
||||
print(f" {Colors.YELLOW}Text already present after: {after_text}{Colors.RESET}")
|
||||
errorList['modWarnings'] += 1
|
||||
@ -187,7 +188,8 @@ def modifyFiles(config, destinationDirectory):
|
||||
raise ValueError(f"Text '{before_text}' not found in file: {filePath}")
|
||||
elif insert_text not in content:
|
||||
print(f" {Colors.GREEN}Inserting text before: {insert_text} {Colors.YELLOW}+ <-{Colors.GREEN} {before_text}{Colors.RESET}")
|
||||
content = content.replace(before_text, insert_text + before_text)
|
||||
# content = content.replace(before_text, insert_text + before_text)
|
||||
content = content.replace(before_text, insert_text.replace('\n', '') + before_text)
|
||||
else:
|
||||
print(f" {Colors.YELLOW}Text already present before: {before_text}{Colors.RESET}")
|
||||
errorList['modWarnings'] += 1
|
||||
|
Reference in New Issue
Block a user