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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
- let o = {}
619
- if (/^[0-9.:]/.test(u)) {
620
- o.forceHttp = true
621
- } else if (/^localhost/.test(u)) {
622
- o.forceHttp = true
623
- } else {
624
- o.forceHttps = true
625
- }
626
- const url = normalizeURL(u, o)
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
- if (url && url.trim().length > 0) {
629
- console.log("url", url)
630
- const { tab, frame } = await addTab(url)
631
- tab.click()
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) => {