max-scale, fix js minify

This commit is contained in:
creeper123123321 2021-10-30 07:53:07 -03:00
parent 3c53825d22
commit 43f09c3130
5 changed files with 18 additions and 22 deletions

View File

@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 16
java-version: 17
- uses: actions/cache@v2
with:
path: ~/.gradle/

View File

@ -1,3 +1,4 @@
import com.google.javascript.jscomp.CompilerOptions.LanguageMode
import com.googlecode.htmlcompressor.compressor.HtmlCompressor
import org.gradlewebtools.minify.minifier.js.JsMinifier
import org.gradlewebtools.minify.minifier.js.JsMinifierOptions
@ -48,12 +49,9 @@ extra.set("archivesBaseName", "VIAaaS")
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.viaversion.com/")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://jitpack.io")
maven("https://nexus.velocitypowered.com/repository/maven-public/")
mavenLocal()
maven("https://jitpack.io/")
}
dependencies {
@ -117,8 +115,17 @@ tasks {
}
class JsMinifyFilter(reader: java.io.Reader) : java.io.FilterReader("".reader()) {
companion object {
val minifier = JsMinifier(
minifierOptions = JsMinifierOptions(
originalFileNames = true,
languageOut = LanguageMode.ECMASCRIPT_2020,
rewritePolyfills = true
)
)
}
init {
val minifier = JsMinifier(minifierOptions = JsMinifierOptions(originalFileNames = true))
val file = JFiles.createTempDirectory("via-").resolve("tmp-minify.js").toFile().also {
it.writeText(reader.readText())
}
@ -142,7 +149,7 @@ tasks.named<ProcessResources>("processResources") {
)
}
filesMatching("**/*.js") {
//filter<JsMinifyFilter>()
filter<JsMinifyFilter>()
}
filesMatching("**/*.html") {
filter<HtmlMinifyFilter>()

View File

@ -1,5 +1,5 @@
before_install:
- curl -s "https://get.sdkman.io" | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk install java 16.0.1-open
- sdk use java 16.0.1-open
- sdk install java 17.0.1-open
- sdk use java 17.0.1-open

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<title>VIAaaS</title>
<meta content="VIAaaS" name="application-name">
<meta content="VIAaaS" property="og:site_name">
@ -31,9 +31,6 @@ script-src 'self' https://*.cloudflare.com/ https://alcdn.msauth.net/ https://*.
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.1/js/bootstrap.min.js"
integrity="sha512-ewfXo9Gq53e1q1+WDTjaHAGZ8UvCWq0eXONhwDuIoaH8xz2r96uoAYaQCm1oQhnBfRXrvJztNXFsTloJfgbL5Q=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/js-polyfills/0.1.43/polyfill.min.js"
integrity="sha512-lvWiOP+aMKHllm4THsjzNleVuGOh0WGniJ3lgu/nvCbex1LlaQSxySUjAu/LTJw9FhnSL/PVYoQcckg1Q03+fQ=="
crossorigin="anonymous"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/HTML5Notification/3.0.0/Notification.min.js"
integrity="sha512-gx0m7Qoum1Bb0KrP6AEZSt0e+o2xMEyStAz2TNGXGqR4HSVgPveWFQdtE06FRvJmmp8HdkJklOLYiV3aZN6tQg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>

View File

@ -371,15 +371,11 @@ function getMicrosoftUsers() {
}
class McAccount {
id;
name;
accessToken;
loggedOut = false;
constructor(id, username, accessToken) {
this.id = id;
this.name = username;
this.accessToken = accessToken;
this.loggedOut = false;
}
logout() {
@ -427,8 +423,6 @@ class McAccount {
}
class MojangAccount extends McAccount {
clientToken;
constructor(id, username, accessToken, clientToken) {
super(id, username, accessToken);
this.clientToken = clientToken;
@ -472,8 +466,6 @@ class MojangAccount extends McAccount {
}
class MicrosoftAccount extends McAccount {
msUser;
constructor(id, username, accessToken, msUser) {
super(id, username, accessToken);
this.msUser = msUser;