pinokiod 1.0.26 → 1.0.28
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 +17 -13
package/package.json
CHANGED
package/server/views/browser.ejs
CHANGED
|
@@ -315,6 +315,7 @@ body.dark .header-item.cursor.header-top {
|
|
|
315
315
|
background: rgba(0,0,0,0.07) !important;
|
|
316
316
|
}
|
|
317
317
|
#new-tab {
|
|
318
|
+
cursor: pointer;
|
|
318
319
|
justify-content: center;
|
|
319
320
|
border-top: 1px solid rgba(0,0,0,0.04);
|
|
320
321
|
}
|
|
@@ -615,20 +616,23 @@ document.querySelector("#forward").addEventListener("click", (e) => {
|
|
|
615
616
|
document.querySelector("#new-tab").addEventListener("click", async (e) => {
|
|
616
617
|
const u = prompt("url")
|
|
617
618
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
619
|
+
if (u) {
|
|
620
|
+
let o = {}
|
|
621
|
+
if (/^[0-9.:]/.test(u)) {
|
|
622
|
+
o.forceHttp = true
|
|
623
|
+
} else if (/^localhost/.test(u)) {
|
|
624
|
+
o.forceHttp = true
|
|
625
|
+
} else {
|
|
626
|
+
o.forceHttps = true
|
|
627
|
+
}
|
|
627
628
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
const url = normalizeURL(u, o)
|
|
630
|
+
|
|
631
|
+
if (url && url.trim().length > 0) {
|
|
632
|
+
console.log("url", url)
|
|
633
|
+
const { tab, frame } = await addTab(url)
|
|
634
|
+
tab.click()
|
|
635
|
+
}
|
|
632
636
|
}
|
|
633
637
|
})
|
|
634
638
|
document.querySelector("#clone-tab").addEventListener("click", async (e) => {
|