pinokiod 1.0.36 → 1.0.38
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 +33 -11
- 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>
|
|
@@ -511,15 +528,15 @@ const renderCursor = () => {
|
|
|
511
528
|
const nav = (type) => {
|
|
512
529
|
let targetFrame = document.querySelector("iframe:not(.hidden)")
|
|
513
530
|
if (type === "back") {
|
|
514
|
-
|
|
515
|
-
targetFrame.contentWindow.postMessage({
|
|
516
|
-
action: "back"
|
|
517
|
-
}, "*")
|
|
531
|
+
targetFrame.contentWindow.history.back()
|
|
532
|
+
// targetFrame.contentWindow.postMessage({
|
|
533
|
+
// action: "back"
|
|
534
|
+
// }, "*")
|
|
518
535
|
} else if (type === "forward") {
|
|
519
|
-
|
|
520
|
-
targetFrame.contentWindow.postMessage({
|
|
521
|
-
action: "forward"
|
|
522
|
-
}, "*")
|
|
536
|
+
targetFrame.contentWindow.history.forward()
|
|
537
|
+
// targetFrame.contentWindow.postMessage({
|
|
538
|
+
// action: "forward"
|
|
539
|
+
// }, "*")
|
|
523
540
|
}
|
|
524
541
|
|
|
525
542
|
|
|
@@ -846,14 +863,17 @@ document.querySelector("#reload").addEventListener("click", (e) => {
|
|
|
846
863
|
renderSelection(null, true)
|
|
847
864
|
*/
|
|
848
865
|
let frame = document.querySelector("iframe:not(.hidden)")
|
|
849
|
-
frame.
|
|
866
|
+
frame.src = frame.src
|
|
867
|
+
// frame.contentWindow.location.reload();
|
|
850
868
|
})
|
|
869
|
+
/*
|
|
851
870
|
document.querySelector("#back").addEventListener("click", (e) => {
|
|
852
871
|
nav("back")
|
|
853
872
|
})
|
|
854
873
|
document.querySelector("#forward").addEventListener("click", (e) => {
|
|
855
874
|
nav("forward")
|
|
856
875
|
})
|
|
876
|
+
*/
|
|
857
877
|
|
|
858
878
|
document.querySelector("#new-tab").addEventListener("click", async (e) => {
|
|
859
879
|
const u = prompt("url")
|
|
@@ -1132,6 +1152,8 @@ window.addEventListener('message', (event) => {
|
|
|
1132
1152
|
if (event.data.action.type === "newtab") {
|
|
1133
1153
|
console.log("create tab", event.data.action.url)
|
|
1134
1154
|
addTab(event.data.action.url)
|
|
1155
|
+
} else if (event.data.action.type === "title") {
|
|
1156
|
+
console.log("title", event.data)
|
|
1135
1157
|
}
|
|
1136
1158
|
} else if (event.data.type) {
|
|
1137
1159
|
if (event.data.type === 'disconnect') {
|