pinokiod 1.0.32 → 1.0.34
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 +37 -22
package/package.json
CHANGED
package/server/views/browser.ejs
CHANGED
|
@@ -99,6 +99,9 @@ body.dark .header-item .btn2 {
|
|
|
99
99
|
color: var(--darkt-color);
|
|
100
100
|
*/
|
|
101
101
|
}
|
|
102
|
+
.bar .btn2 i {
|
|
103
|
+
display: block;
|
|
104
|
+
}
|
|
102
105
|
.header-item > * {
|
|
103
106
|
display: block;
|
|
104
107
|
}
|
|
@@ -315,7 +318,7 @@ nav .logo {
|
|
|
315
318
|
padding: 10px;
|
|
316
319
|
}
|
|
317
320
|
#location {
|
|
318
|
-
padding: 5px;
|
|
321
|
+
padding: 5px 10px;
|
|
319
322
|
font-size: 12px;
|
|
320
323
|
font-family: verdana;
|
|
321
324
|
}
|
|
@@ -428,9 +431,8 @@ body.dark .loader-container {
|
|
|
428
431
|
<button class='btn2 logo' id='forward'><i class="fa-solid fa-arrow-right"></i></button>
|
|
429
432
|
<button class='btn2 logo' id='reload'><i class="fa-solid fa-rotate-right"></i></button>
|
|
430
433
|
<div id='location'></div>
|
|
431
|
-
<div class='flexible'></div>
|
|
432
|
-
<a class='btn2' id='open-browser' target="_blank" href=""><i class="fa-solid fa-square-arrow-up-right"></i> External Browser</a>
|
|
433
434
|
<button class='btn2' id='clone-tab'><i class='fa-regular fa-copy'></i> Clone</button>
|
|
435
|
+
<a class='btn2' id='open-browser' target="_blank" href=""><i class="fa-solid fa-square-arrow-up-right"></i> Popout</a>
|
|
434
436
|
</div>
|
|
435
437
|
<!--
|
|
436
438
|
<div class='flexible'></div>
|
|
@@ -507,26 +509,35 @@ const renderCursor = () => {
|
|
|
507
509
|
target.classList.add("cursor")
|
|
508
510
|
}
|
|
509
511
|
const nav = (type) => {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
let index = id.slice(1)
|
|
516
|
-
let target = document.querySelector(`aside .${type} [data-index='${index}']`)
|
|
517
|
-
let targetFrame = document.querySelector(`iframe[name='${target.target}']`)
|
|
518
|
-
console.log({ target, targetFrame })
|
|
519
|
-
if (type === "back") {
|
|
520
|
-
targetFrame.contentWindow.history.back()
|
|
521
|
-
} else if (type === "forward") {
|
|
522
|
-
targetFrame.contentWindow.history.forward()
|
|
523
|
-
}
|
|
524
|
-
/*
|
|
525
|
-
targetFrame.contentWindow.postMessage({
|
|
526
|
-
action: type
|
|
527
|
-
}, "*")
|
|
528
|
-
*/
|
|
512
|
+
let targetFrame = document.querySelector("iframe:not(.hidden)")
|
|
513
|
+
if (type === "back") {
|
|
514
|
+
targetFrame.contentWindow.history.back()
|
|
515
|
+
} else if (type === "forward") {
|
|
516
|
+
targetFrame.contentWindow.history.forward()
|
|
529
517
|
}
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
// if (location.hash && location.hash.length > 0) {
|
|
522
|
+
//// let id = getTarget(location.hash.slice(1))
|
|
523
|
+
//// let target = document.querySelector("aside [target='" + id + "']")
|
|
524
|
+
// let id = location.hash.slice(1)
|
|
525
|
+
// let type = id[0]
|
|
526
|
+
// let index = id.slice(1)
|
|
527
|
+
// let target = document.querySelector(`aside .${type} [data-index='${index}']`)
|
|
528
|
+
// let targetFrame = document.querySelector(`iframe[name='${target.target}']`)
|
|
529
|
+
// console.log({ target, targetFrame })
|
|
530
|
+
// if (type === "back") {
|
|
531
|
+
// targetFrame.contentWindow.history.back()
|
|
532
|
+
// } else if (type === "forward") {
|
|
533
|
+
// targetFrame.contentWindow.history.forward()
|
|
534
|
+
// }
|
|
535
|
+
// /*
|
|
536
|
+
// targetFrame.contentWindow.postMessage({
|
|
537
|
+
// action: type
|
|
538
|
+
// }, "*")
|
|
539
|
+
// */
|
|
540
|
+
// }
|
|
530
541
|
}
|
|
531
542
|
const renderSelection = (e, force) => {
|
|
532
543
|
console.log("# 1")
|
|
@@ -821,11 +832,15 @@ renderSelection()
|
|
|
821
832
|
console.log("loaded after", loaded)
|
|
822
833
|
Reporter()
|
|
823
834
|
document.querySelector("#reload").addEventListener("click", (e) => {
|
|
835
|
+
/*
|
|
824
836
|
// get selected
|
|
825
837
|
let target = document.querySelector(".selected").target
|
|
826
838
|
location.hash = target
|
|
827
839
|
// force refresh
|
|
828
840
|
renderSelection(null, true)
|
|
841
|
+
*/
|
|
842
|
+
let frame = document.querySelector("iframe:not(.hidden)")
|
|
843
|
+
frame.contentWindow.location.reload();
|
|
829
844
|
})
|
|
830
845
|
document.querySelector("#back").addEventListener("click", (e) => {
|
|
831
846
|
nav("back")
|