first
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Reads "input" and rewrites all external CSS/asset references so they point
|
||||
# to this repo (git.weebs.zone/Weebs.Zone/Jellyfin-Theme-1) instead of the
|
||||
# original CDN/source URLs. Result is written to "output".
|
||||
|
||||
$repoBase = "https://git.weebs.zone/Weebs.Zone/Jellyfin-Theme-1/raw/branch/main"
|
||||
|
||||
$content = Get-Content -Path (Join-Path $PSScriptRoot "input") -Raw
|
||||
|
||||
# Ultrachromic imports (jsdelivr CDN) -> local copies under css/Ultrachromic
|
||||
$content = $content -replace 'https://cdn\.jsdelivr\.net/gh/CTalvio/Ultrachromic/([^)''"\s]+)', ($repoBase + '/css/Ultrachromic/$1')
|
||||
|
||||
# Monochromic imports (github.io) -> local copies under css/Monochromic
|
||||
$content = $content -replace 'https://ctalvio\.github\.io/Monochromic/([^)''"\s]+)', ($repoBase + '/css/Monochromic/$1')
|
||||
|
||||
# Any other git.weebs.zone repo references -> this repo
|
||||
$content = $content -replace 'https://git\.weebs\.zone/Weebs\.Zone/[^/]+/raw/branch/main/', ($repoBase + '/')
|
||||
|
||||
Set-Content -Path (Join-Path $PSScriptRoot "output") -Value $content -NoNewline
|
||||
|
||||
Write-Host "output erstellt."
|
||||
Reference in New Issue
Block a user