Make links actually work

This commit is contained in:
Carlo Piovesan 2022-10-05 16:11:51 +02:00
parent 0d37154516
commit 68fab5c95a

View File

@ -164,7 +164,7 @@
getAsciiText: function () getAsciiText: function ()
{ {
var text = [ var text = [
"+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+", "+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
"| |", "| |",
"| WebVM is a server-less virtual Linux environment running fully client-side |", "| WebVM is a server-less virtual Linux environment running fully client-side |",
"| in HTML5/WebAssembly. |", "| in HTML5/WebAssembly. |",
@ -179,9 +179,9 @@
"| [NEW!] WebVM now supports full TCP and UDP networking via Tailscale, click |", "| [NEW!] WebVM now supports full TCP and UDP networking via Tailscale, click |",
"| on Tailscale Login to enable it. Read the announcement: |", "| on Tailscale Login to enable it. Read the announcement: |",
"| |", "| |",
"| " + underline + "https://leaningtech.com/webvm-virtual-machine-with-networking-via-tailscale" + normal +"|", "| " + underline + "https://leaningtech.com/webvm-virtual-machine-with-networking-via-tailscale" + normal +" |",
"| |", "| |",
"+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+", "+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
"", "",
" Welcome to WebVM (build CX_VERSION). If unsure, try these examples:", " Welcome to WebVM (build CX_VERSION). If unsure, try these examples:",
"", "",
@ -333,15 +333,12 @@
function initialMessage() function initialMessage()
{ {
printOnTerm.printMessage(printOnTerm.getAsciiTitle()); printOnTerm.printMessage(printOnTerm.getAsciiTitle());
printOnTerm.printMessage(["\n"]); printOnTerm.printMessage([""]);
printOnTerm.printMessage(printOnTerm.getAsciiText()); printOnTerm.printMessage(printOnTerm.getAsciiText());
term.registerLinkMatcher(/https:\/\/medium\.com\/p\/40a60170b361/, function(mouseEvent, matchedString) { term.registerLinkMatcher(/https:\/\/leaningtech.com\/webvm/, function(mouseEvent, matchedString) {
window.open(matchedString, "_blank") window.open(matchedString, "_blank")
}); });
term.registerLinkMatcher(/https:\/\/github.com\/leaningtech\/webvm/, function(mouseEvent, matchedString) { term.registerLinkMatcher(/https:\/\/leaningtech.com\/webvm-virtual-machine-with-networking-via-tailscale/, function(mouseEvent, matchedString) {
window.open(matchedString, "_blank")
});
term.registerLinkMatcher(/https:\/\/discord.leaningtech.com/, function(mouseEvent, matchedString) {
window.open(matchedString, "_blank") window.open(matchedString, "_blank")
}); });
console.log("Welcome. We appreciate curiosity, but be warned that keeping the DevTools open causes significant performance degradation and crashes."); console.log("Welcome. We appreciate curiosity, but be warned that keeping the DevTools open causes significant performance degradation and crashes.");