pinokiod 3.98.0 → 3.100.0

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": "3.98.0",
3
+ "version": "3.100.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1399,8 +1399,12 @@ const open_url2 = (href, target, features) => {
1399
1399
  }
1400
1400
  }
1401
1401
  hotkeys("ctrl+t,cmd+t,ctrl+n,cmd+n", (e) => {
1402
- open_url2(location.href, "_blank")
1403
- // window.open("/", "_blank", "self")
1402
+ let agent = document.body.getAttribute("data-agent")
1403
+ if (agent === "electron") {
1404
+ window.open(location.href, "_blank", "pinokio")
1405
+ } else {
1406
+ window.open(location.href, "_blank")
1407
+ }
1404
1408
  })
1405
1409
  const refreshParent = (e) => {
1406
1410
  // if (window.parent === window.top) {
@@ -1604,7 +1608,12 @@ document.addEventListener("DOMContentLoaded", () => {
1604
1608
  }
1605
1609
  if (document.querySelector("#clone-win")) {
1606
1610
  document.querySelector("#clone-win").addEventListener("click", (e) => {
1607
- open_url2(location.href, "_blank")
1611
+ let agent = document.body.getAttribute("data-agent")
1612
+ if (agent === "electron") {
1613
+ window.open(location.href, "_blank", "pinokio")
1614
+ } else {
1615
+ window.open(location.href, "_blank")
1616
+ }
1608
1617
  })
1609
1618
  }
1610
1619
 
@@ -23,7 +23,7 @@
23
23
  const HOST_ORIGIN = window.location.origin;
24
24
  const STORAGE_PREFIX = 'pinokio:layout:';
25
25
  const MIN_PANEL_SIZE = 120;
26
- const GUTTER_SIZE = 6;
26
+ const GUTTER_SIZE = 4;
27
27
 
28
28
  const state = {
29
29
  sessionId: typeof parsedConfig.sessionId === 'string' && parsedConfig.sessionId.trim() ? parsedConfig.sessionId.trim() : null,
@@ -15,11 +15,12 @@ document.addEventListener("DOMContentLoaded", () => {
15
15
  if (document.querySelector("#new-window")) {
16
16
  document.querySelector("#new-window").addEventListener("click", (e) => {
17
17
  let agent = document.body.getAttribute("data-agent")
18
- window.open("/", "_blank", "self")
19
- /*
18
+ //window.open("/", "_blank", "self")
20
19
  if (agent === "electron") {
21
- window.open("/", "_blank", "self")
20
+ window.open("/", "_blank", "pinokio")
22
21
  } else {
22
+ window.open("/", "_blank")
23
+ /*
23
24
  fetch("/go", {
24
25
  method: "POST",
25
26
  headers: {
@@ -31,8 +32,8 @@ document.addEventListener("DOMContentLoaded", () => {
31
32
  }).then((res) => {
32
33
  console.log(res)
33
34
  })
35
+ */
34
36
  }
35
- */
36
37
  })
37
38
  }
38
39
  })
@@ -103,7 +103,12 @@ document.addEventListener("click", async (e) => {
103
103
  let features = el.getAttribute("features")
104
104
  let href = el.href || el.getAttribute("data-href")
105
105
  if (href) {
106
- open_url(href, "_blank", features)
106
+ let agent = document.body.getAttribute("data-agent")
107
+ if (agent === "electron") {
108
+ window.open(href, "_blank", "pinokio")
109
+ } else {
110
+ window.open(href, "_blank", features)
111
+ }
107
112
  }
108
113
  // if (features && features.includes("app")) {
109
114
  // window.open(el.href, "_blank", features)
@@ -136,8 +141,14 @@ document.addEventListener("click", async (e) => {
136
141
  if (el) {
137
142
  e.preventDefault()
138
143
  e.stopPropagation()
139
- let features = el.getAttribute("features")
140
- window.open(el.href, "_blank", features)
144
+ let agent = document.body.getAttribute("data-agent")
145
+ if (agent === "electron") {
146
+ window.open(href, "_blank", "pinokio")
147
+ } else {
148
+ // window.open(href, "_blank", features)
149
+ let features = el.getAttribute("features")
150
+ window.open(el.href, "_blank", features)
151
+ }
141
152
  }
142
153
  }
143
154
  })
@@ -290,11 +290,11 @@ body.dark .navheader2 .btn {
290
290
  /*
291
291
  padding: 10px 0;
292
292
  */
293
- padding: 0 0 8px;
293
+ padding: 0 0 5px;
294
294
  /*
295
295
  background: white;
296
296
  */
297
- background: #F9F9FB !important;
297
+ background: #F1F1F1 !important;
298
298
  }
299
299
  .navheader {
300
300
  backdrop-filter: blur(16px);
@@ -148,9 +148,8 @@ body.dark .appcanvas_filler {
148
148
  border: none;
149
149
  }
150
150
  .appcanvas_filler {
151
- height: 8px;
152
- background: #F9F9FB !important;
153
- border-top: 1px solid var(--pinokio-sidebar-tabbar-border);
151
+ height: 5px;
152
+ background: #F1F1F1 !important;
154
153
  }
155
154
 
156
155
  .appcanvas > .container {
@@ -393,9 +392,11 @@ body.dark .appcanvas > aside .header-item.selected {
393
392
  border-color: var(--pinokio-sidebar-tab-active-bg);
394
393
  */
395
394
  color: var(--pinokio-sidebar-tab-active-color);
395
+ /*
396
396
  border-color: var(--sidebar-tab-outline);
397
+ */
397
398
  box-shadow: 0 4px 12px var(--pinokio-sidebar-tab-shadow);
398
- background: #F9F9FB !important;
399
+ background: #F1F1F1 !important;
399
400
  border-bottom: none;
400
401
  z-index: 1;
401
402
  }
@@ -695,8 +696,7 @@ body.dark .header-item.cursor {
695
696
  cursor: pointer;
696
697
  }
697
698
  body .frame-link.selected {
698
- background: #F9F9FB !important;
699
- border: 1px solid rgba(203, 213, 225, 0.7);
699
+ background: #F1F1F1 !important;
700
700
  }
701
701
  .frame-link.selected .del {
702
702
  color: white;
@@ -1281,8 +1281,7 @@ body.dark #fs-status {
1281
1281
  }
1282
1282
  #fs-status {
1283
1283
  padding: 5px;
1284
- background: #F9F9FB !important;
1285
- border-top: 1px solid rgba(203, 213, 225, 0.7);
1284
+ background: #F1F1F1 !important;
1286
1285
  gap: 4px;
1287
1286
  box-sizing: border-box;
1288
1287
  /*
@@ -3386,6 +3385,26 @@ body.dark {
3386
3385
  if (!canonical) {
3387
3386
  return
3388
3387
  }
3388
+ let skip = false
3389
+ try {
3390
+ const parsed = new URL(canonical)
3391
+ const originLower = parsed.origin.toLowerCase()
3392
+ if (originLower === location.origin.toLowerCase()) {
3393
+ skip = true
3394
+ } else {
3395
+ const hostLower = parsed.hostname.toLowerCase()
3396
+ const port = parsed.port || (parsed.protocol === "http:" ? "80" : parsed.protocol === "https:" ? "443" : "")
3397
+ const localHosts = new Set(["localhost", "127.0.0.1", "0.0.0.0", "::1"])
3398
+ if (parsed.protocol === "http:" && port === "42000" && localHosts.has(hostLower)) {
3399
+ skip = true
3400
+ }
3401
+ }
3402
+ } catch (_) {
3403
+ // ignore parse failures but do not skip by default
3404
+ }
3405
+ if (skip) {
3406
+ return
3407
+ }
3389
3408
  if (entryByUrl.has(canonical)) {
3390
3409
  return
3391
3410
  }
@@ -55,8 +55,8 @@ main {
55
55
 
56
56
  /*
57
57
  margin-bottom: 10px;
58
- */
59
58
  background: rgba(0,0,0,0.05);
59
+ */
60
60
  }
61
61
  .tab:hover,
62
62
  .tab:focus-visible {