pinokiod 0.1.56 → 0.1.58
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 +2 -2
- package/server/views/browser.ejs +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"multer": "^1.4.5-lts.1",
|
|
41
41
|
"node-downloader-helper": "^2.1.9",
|
|
42
42
|
"node-pty-prebuilt-multiarch-cp": "^0.10.1-pre.48",
|
|
43
|
-
"pdrive": "^0.0.
|
|
43
|
+
"pdrive": "^0.0.11",
|
|
44
44
|
"portfinder": "^1.0.32",
|
|
45
45
|
"rimraf": "^5.0.0",
|
|
46
46
|
"sanitize-filename": "^1.6.3",
|
package/server/views/browser.ejs
CHANGED
|
@@ -417,7 +417,9 @@ const renderCursor = () => {
|
|
|
417
417
|
target.classList.add("cursor")
|
|
418
418
|
}
|
|
419
419
|
const renderSelection = (e, force) => {
|
|
420
|
+
console.log("# 1")
|
|
420
421
|
if (location.hash && location.hash.length > 0) {
|
|
422
|
+
console.log("# 2")
|
|
421
423
|
document.querySelector(".bar").classList.remove("hidden")
|
|
422
424
|
let id = getTarget(location.hash.slice(1))
|
|
423
425
|
|
|
@@ -446,6 +448,7 @@ const renderSelection = (e, force) => {
|
|
|
446
448
|
}
|
|
447
449
|
|
|
448
450
|
if (target) {
|
|
451
|
+
console.log("# 3")
|
|
449
452
|
|
|
450
453
|
//document.querySelector("#location").innerHTML = id
|
|
451
454
|
document.querySelector("#location").innerHTML = location.hash.slice(1)
|
|
@@ -478,27 +481,37 @@ const renderSelection = (e, force) => {
|
|
|
478
481
|
return
|
|
479
482
|
}
|
|
480
483
|
|
|
484
|
+
console.log("# 4")
|
|
485
|
+
|
|
481
486
|
if (e) {
|
|
487
|
+
console.log("# 5", { src: targetFrame.src, href: target.href, target: target.target })
|
|
482
488
|
// triggered with a click
|
|
483
489
|
// do not reload iframe if the href and the src is the same
|
|
484
|
-
if (targetFrame.src
|
|
490
|
+
if (targetFrame.src.includes(target.href)) {
|
|
491
|
+
// if (targetFrame.src === target.href) {
|
|
485
492
|
e.preventDefault()
|
|
486
493
|
e.stopPropagation()
|
|
487
494
|
}
|
|
488
495
|
} else {
|
|
496
|
+
console.log("# 6")
|
|
489
497
|
if (force) {
|
|
498
|
+
console.log("# 7")
|
|
490
499
|
// if (targetFrame.src !== target.href) {
|
|
491
500
|
targetFrame.src = target.href
|
|
492
501
|
// }
|
|
493
502
|
}
|
|
494
503
|
}
|
|
495
504
|
} else {
|
|
505
|
+
console.log("# 8")
|
|
496
506
|
//targetFrame.contentWindow.addEventListener("load", () => {
|
|
497
507
|
if (e) {
|
|
508
|
+
console.log("# 9")
|
|
498
509
|
// coming from a click => don't need to set the src
|
|
499
510
|
} else {
|
|
511
|
+
console.log("# 10")
|
|
500
512
|
// load without click
|
|
501
513
|
if (targetFrame.src !== target.href) {
|
|
514
|
+
console.log("# 11")
|
|
502
515
|
targetFrame.src = target.href
|
|
503
516
|
}
|
|
504
517
|
}
|
|
@@ -506,6 +519,7 @@ const renderSelection = (e, force) => {
|
|
|
506
519
|
//});
|
|
507
520
|
}
|
|
508
521
|
} else {
|
|
522
|
+
console.log("# 12")
|
|
509
523
|
let frame = document.createElement("iframe")
|
|
510
524
|
frame.name = target.target
|
|
511
525
|
frame.src = target.href
|
|
@@ -513,12 +527,14 @@ const renderSelection = (e, force) => {
|
|
|
513
527
|
loaded[target.target] = true
|
|
514
528
|
}
|
|
515
529
|
} else {
|
|
530
|
+
console.log("# 13")
|
|
516
531
|
// couldn't find item,
|
|
517
532
|
// clear the hash
|
|
518
533
|
//
|
|
519
534
|
location.hash = ""
|
|
520
535
|
}
|
|
521
536
|
} else {
|
|
537
|
+
console.log("# 14")
|
|
522
538
|
document.querySelector(".bar").classList.add("hidden")
|
|
523
539
|
}
|
|
524
540
|
}
|