pinokiod 1.0.35 → 1.0.37
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/public/common.js +10 -10
- package/server/views/browser.ejs +29 -3
- package/server/views/settings.ejs +2 -1
package/package.json
CHANGED
package/server/public/common.js
CHANGED
|
@@ -6,13 +6,13 @@ const refreshParent = (e) => {
|
|
|
6
6
|
window.parent.postMessage(e, "*")
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
window.addEventListener('message', (event) => {
|
|
10
|
-
console.log("Message received from the child: ", event.data); // Message received from child
|
|
11
|
-
if (event.data && event.data.action) {
|
|
12
|
-
if (event.data.action === "back") {
|
|
13
|
-
history.back()
|
|
14
|
-
} else if (event.data.action === "forward") {
|
|
15
|
-
history.forward()
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
9
|
+
//window.addEventListener('message', (event) => {
|
|
10
|
+
// console.log("Message received from the child: ", event.data); // Message received from child
|
|
11
|
+
// if (event.data && event.data.action) {
|
|
12
|
+
// if (event.data.action === "back") {
|
|
13
|
+
// history.back()
|
|
14
|
+
// } else if (event.data.action === "forward") {
|
|
15
|
+
// history.forward()
|
|
16
|
+
// }
|
|
17
|
+
// }
|
|
18
|
+
//});
|
package/server/views/browser.ejs
CHANGED
|
@@ -298,20 +298,32 @@ body.dark nav {
|
|
|
298
298
|
/*
|
|
299
299
|
border-bottom: 1px solid rgba(255,255,255,0.04);
|
|
300
300
|
*/
|
|
301
|
+
border-bottom: 1px solid rgba(255,255,255,0.04);
|
|
301
302
|
}
|
|
302
303
|
nav {
|
|
303
304
|
background: white;
|
|
305
|
+
/*
|
|
304
306
|
padding: 5px;
|
|
307
|
+
*/
|
|
308
|
+
padding: 0;
|
|
305
309
|
cursor: grab !important;
|
|
306
310
|
-webkit-app-region: drag !important;
|
|
307
311
|
/*
|
|
308
312
|
border-bottom: 1px solid rgba(0,0,0,0.04);
|
|
309
313
|
*/
|
|
314
|
+
border-bottom: 1px solid rgba(0,0,0,0.04);
|
|
310
315
|
box-sizing: border-box;
|
|
311
316
|
}
|
|
317
|
+
body.dark nav .btn2 {
|
|
318
|
+
border-right: 1px solid rgba(255,255,255,0.04);
|
|
319
|
+
}
|
|
312
320
|
nav .btn2 {
|
|
313
321
|
padding: 10px;
|
|
314
322
|
font-size: 12px;
|
|
323
|
+
width: 60px;
|
|
324
|
+
box-sizing: border-box;
|
|
325
|
+
border-right: 1px solid rgba(0,0,0,0.04);
|
|
326
|
+
border-radius: 0;
|
|
315
327
|
}
|
|
316
328
|
nav .logo {
|
|
317
329
|
font-size: 14px;
|
|
@@ -427,12 +439,17 @@ body.dark .loader-container {
|
|
|
427
439
|
<div class='container'>
|
|
428
440
|
<nav>
|
|
429
441
|
<div class='hidden bar'>
|
|
442
|
+
<!--
|
|
430
443
|
<button class='btn2 logo' id='back'><i class="fa-solid fa-arrow-left"></i></button>
|
|
431
444
|
<button class='btn2 logo' id='forward'><i class="fa-solid fa-arrow-right"></i></button>
|
|
432
|
-
|
|
433
|
-
<div id='location'></div>
|
|
445
|
+
-->
|
|
434
446
|
<button class='btn2' id='clone-tab'><i class='fa-regular fa-copy'></i> Clone</button>
|
|
435
447
|
<a class='btn2' id='open-browser' target="_blank" href=""><i class="fa-solid fa-square-arrow-up-right"></i> Popout</a>
|
|
448
|
+
<button class='btn2' id='reload'><i class="fa-solid fa-rotate-right"></i> Refresh</button>
|
|
449
|
+
<!--
|
|
450
|
+
<button class='btn2 logo' id='reload'><i class="fa-solid fa-rotate-right"></i></button>
|
|
451
|
+
-->
|
|
452
|
+
<div id='location'></div>
|
|
436
453
|
</div>
|
|
437
454
|
<!--
|
|
438
455
|
<div class='flexible'></div>
|
|
@@ -512,8 +529,14 @@ const nav = (type) => {
|
|
|
512
529
|
let targetFrame = document.querySelector("iframe:not(.hidden)")
|
|
513
530
|
if (type === "back") {
|
|
514
531
|
targetFrame.contentWindow.history.back()
|
|
532
|
+
// targetFrame.contentWindow.postMessage({
|
|
533
|
+
// action: "back"
|
|
534
|
+
// }, "*")
|
|
515
535
|
} else if (type === "forward") {
|
|
516
536
|
targetFrame.contentWindow.history.forward()
|
|
537
|
+
// targetFrame.contentWindow.postMessage({
|
|
538
|
+
// action: "forward"
|
|
539
|
+
// }, "*")
|
|
517
540
|
}
|
|
518
541
|
|
|
519
542
|
|
|
@@ -840,7 +863,8 @@ document.querySelector("#reload").addEventListener("click", (e) => {
|
|
|
840
863
|
renderSelection(null, true)
|
|
841
864
|
*/
|
|
842
865
|
let frame = document.querySelector("iframe:not(.hidden)")
|
|
843
|
-
frame.
|
|
866
|
+
frame.src = frame.src
|
|
867
|
+
// frame.contentWindow.location.reload();
|
|
844
868
|
})
|
|
845
869
|
document.querySelector("#back").addEventListener("click", (e) => {
|
|
846
870
|
nav("back")
|
|
@@ -1126,6 +1150,8 @@ window.addEventListener('message', (event) => {
|
|
|
1126
1150
|
if (event.data.action.type === "newtab") {
|
|
1127
1151
|
console.log("create tab", event.data.action.url)
|
|
1128
1152
|
addTab(event.data.action.url)
|
|
1153
|
+
} else if (event.data.action.type === "title") {
|
|
1154
|
+
console.log("title", event.data)
|
|
1129
1155
|
}
|
|
1130
1156
|
} else if (event.data.type) {
|
|
1131
1157
|
if (event.data.type === 'disconnect') {
|