pinokiod 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/views/browser.ejs +16 -13
package/package.json
CHANGED
package/server/views/browser.ejs
CHANGED
|
@@ -615,20 +615,23 @@ document.querySelector("#forward").addEventListener("click", (e) => {
|
|
|
615
615
|
document.querySelector("#new-tab").addEventListener("click", async (e) => {
|
|
616
616
|
const u = prompt("url")
|
|
617
617
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
618
|
+
if (u) {
|
|
619
|
+
let o = {}
|
|
620
|
+
if (/^[0-9.:]/.test(u)) {
|
|
621
|
+
o.forceHttp = true
|
|
622
|
+
} else if (/^localhost/.test(u)) {
|
|
623
|
+
o.forceHttp = true
|
|
624
|
+
} else {
|
|
625
|
+
o.forceHttps = true
|
|
626
|
+
}
|
|
627
627
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
628
|
+
const url = normalizeURL(u, o)
|
|
629
|
+
|
|
630
|
+
if (url && url.trim().length > 0) {
|
|
631
|
+
console.log("url", url)
|
|
632
|
+
const { tab, frame } = await addTab(url)
|
|
633
|
+
tab.click()
|
|
634
|
+
}
|
|
632
635
|
}
|
|
633
636
|
})
|
|
634
637
|
document.querySelector("#clone-tab").addEventListener("click", async (e) => {
|