Add: casono website domain into Casono Browser
This commit is contained in:
+5
-1
@@ -113,6 +113,7 @@ public class CasinoBrowserController {
|
|||||||
TRUSTED_DOMAINS.add("searx.be");
|
TRUSTED_DOMAINS.add("searx.be");
|
||||||
TRUSTED_DOMAINS.add("startpage.com");
|
TRUSTED_DOMAINS.add("startpage.com");
|
||||||
TRUSTED_DOMAINS.add("vscode.dev");
|
TRUSTED_DOMAINS.add("vscode.dev");
|
||||||
|
TRUSTED_DOMAINS.add("casono.netlify.app");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Aliases for common websites. */
|
/** Aliases for common websites. */
|
||||||
@@ -142,7 +143,10 @@ public class CasinoBrowserController {
|
|||||||
Map.entry("uni", "unibas.ch"),
|
Map.entry("uni", "unibas.ch"),
|
||||||
Map.entry("vs", "vscode.dev"),
|
Map.entry("vs", "vscode.dev"),
|
||||||
Map.entry("vscode", "vscode.dev"),
|
Map.entry("vscode", "vscode.dev"),
|
||||||
Map.entry("vs code", "vscode.dev"));
|
Map.entry("vs code", "vscode.dev"),
|
||||||
|
Map.entry("main", "casono.netlify.app"),
|
||||||
|
Map.entry("cas", "casono.netlify.app"),
|
||||||
|
Map.entry("casono", "casono.netlify.app"));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves user input into a valid URL.
|
* Resolves user input into a valid URL.
|
||||||
|
|||||||
+1
-20
@@ -1939,28 +1939,9 @@ public class TaskbarController {
|
|||||||
*/
|
*/
|
||||||
@FXML
|
@FXML
|
||||||
private void onBrowserButtonClickCasono() {
|
private void onBrowserButtonClickCasono() {
|
||||||
SoundManager.getInstance().playButtonClick();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Path start = Paths.get(System.getProperty("user.dir"));
|
|
||||||
|
|
||||||
Path file = start;
|
CasinoBrowserController.open("https://casono.netlify.app/");
|
||||||
|
|
||||||
while (file != null && !file.getFileName().toString().equals("Gruppe-13")) {
|
|
||||||
file = file.getParent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file == null) {
|
|
||||||
throw new IllegalStateException("Gruppe-13 not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
Path target = file.resolve("outreach").resolve("index.html");
|
|
||||||
|
|
||||||
if (!Files.isRegularFile(target)) {
|
|
||||||
throw new IllegalStateException("outreach/index.html not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
CasinoBrowserController.open(target.toUri().toString());
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user