diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html b/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html
index 3e0f905..9857adf 100644
--- a/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html
+++ b/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html
@@ -43,6 +43,10 @@
Save File
+
@@ -123,14 +127,26 @@
function saveFile() {
var text = editor.getValue();
+ var fileName = prompt("Enter file name:", currentFileName);
+ if (!fileName) return;
+
+ currentFileName = fileName;
var blob = new Blob([text], { type: 'text/plain' });
var a = document.createElement('a');
a.href = URL.createObjectURL(blob);
- a.download = currentFileName;
+ a.download = fileName;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
+
+ function navigate(href) {
+ var a = document.createElement("a");
+ a.href = href;
+ a.target = "_blank";
+ document.body.appendChild(a);
+ a.click();
+ }