mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-08-09 17:41:09 +10:00
preparing for 1.2.93
- support ui-licenses.html
This commit is contained in:
@@ -2487,14 +2487,14 @@
|
|||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"match": [
|
"match": [
|
||||||
"<li><a href=\"#[A-Za-z0-9]{5}\">zlib<\/a><\/li>\n(.|\n)*<\/p><!-- END CONTAINER DEPS LICENSES -->(<\/div>)",
|
"(?s)<li><a href=\"#[A-Za-z0-9]{5}\">zlib<\/a><\/li>.*?<\/p><!-- END CONTAINER DEPS LICENSES -->(<\/div>)|(<p>Third-party licenses[^<]*Desktop UI code:<\/p>\\s*<ul\\b[^>]*>(?:\\s*<li><a href=\"[^\"]+\">.*?<\/a><\/li>){1,8}).*?(<\/ul>).*\\z|(<p>Third-party licenses[^<]*Desktop UI code:<\/p>)\\s*\\z",
|
||||||
"\t",
|
"\t|\\z",
|
||||||
" ",
|
" |\\z",
|
||||||
"(?m)(^\\s*\r?\n)",
|
"(?m)(^\\s*\r?\n)|\\z",
|
||||||
"\r?\n(?!\\(1|\\d)"
|
"\r?\n(?!\\(1|\\d)|\\z"
|
||||||
],
|
],
|
||||||
"replace": [
|
"replace": [
|
||||||
"$2",
|
"$1$2$3$4",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
|||||||
@@ -1936,9 +1936,9 @@ function Helper($paramname, [switch]$CheckOnly) {
|
|||||||
}
|
}
|
||||||
switch ( $paramname ) {
|
switch ( $paramname ) {
|
||||||
"HtmlLicMin" {
|
"HtmlLicMin" {
|
||||||
# licenses.html minification
|
# Licenses HTML minification
|
||||||
$name = "patches.json.others."
|
$name = "patches.json.others."
|
||||||
$n = "licenses.html"
|
$n = $licensesFileName
|
||||||
$contents = "htmlmin"
|
$contents = "htmlmin"
|
||||||
$json = $webjson.others
|
$json = $webjson.others
|
||||||
}
|
}
|
||||||
@@ -2396,7 +2396,10 @@ function extract ($counts, $method, $name, $helper, $add, $patch) {
|
|||||||
$xpui_spa_patch = Join-Path (Join-Path $spotifyDirectory 'Apps') 'xpui.spa'
|
$xpui_spa_patch = Join-Path (Join-Path $spotifyDirectory 'Apps') 'xpui.spa'
|
||||||
$zip = [System.IO.Compression.ZipFile]::Open($xpui_spa_patch, 'update')
|
$zip = [System.IO.Compression.ZipFile]::Open($xpui_spa_patch, 'update')
|
||||||
$file = $zip.GetEntry($name)
|
$file = $zip.GetEntry($name)
|
||||||
if ($null -eq $file) { throw "Archive entry not found: $name" }
|
if ($null -eq $file) {
|
||||||
|
Write-Warning "Error: Archive entry not found: $name"
|
||||||
|
return
|
||||||
|
}
|
||||||
$reader = New-Object System.IO.StreamReader($file.Open())
|
$reader = New-Object System.IO.StreamReader($file.Open())
|
||||||
}
|
}
|
||||||
elseif ($method -eq "nonezip") {
|
elseif ($method -eq "nonezip") {
|
||||||
@@ -3334,9 +3337,10 @@ if ($test_spa) {
|
|||||||
# Remove RTL and minification of all *.css
|
# Remove RTL and minification of all *.css
|
||||||
extract -counts 'more' -name '*.css' -helper 'Cssmin'
|
extract -counts 'more' -name '*.css' -helper 'Cssmin'
|
||||||
|
|
||||||
# licenses.html minification
|
# Licenses HTML minification
|
||||||
|
|
||||||
extract -counts 'one' -method 'zip' -name 'licenses.html' -helper 'HtmlLicMin'
|
$licensesFileName = if ([version]$offline -ge [version]'1.2.93') { 'ui-licenses.html' } else { 'licenses.html' }
|
||||||
|
extract -counts 'one' -method 'zip' -name $licensesFileName -helper 'HtmlLicMin'
|
||||||
# blank.html minification
|
# blank.html minification
|
||||||
extract -counts 'one' -method 'zip' -name 'blank.html' -helper 'HtmlBlank'
|
extract -counts 'one' -method 'zip' -name 'blank.html' -helper 'HtmlBlank'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user