pinokiod 1.0.18 → 1.0.20
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 +13 -2
package/package.json
CHANGED
package/server/views/browser.ejs
CHANGED
|
@@ -401,6 +401,9 @@ body.dark #new-tab {
|
|
|
401
401
|
</main>
|
|
402
402
|
</div>
|
|
403
403
|
<script>
|
|
404
|
+
window.prompt = (a, b) => {
|
|
405
|
+
console.log("PROMPT", { a, b })
|
|
406
|
+
}
|
|
404
407
|
let loaded = {}
|
|
405
408
|
let cursorIndex = 0;
|
|
406
409
|
const getTarget = (href) => {
|
|
@@ -533,8 +536,8 @@ console.log({ type, index })
|
|
|
533
536
|
// triggered with a click
|
|
534
537
|
// do not reload iframe if the href and the src is the same
|
|
535
538
|
if (target.closest(".h")) {
|
|
536
|
-
if (targetFrame.src.includes(target.target)) {
|
|
537
|
-
|
|
539
|
+
// if (targetFrame.src.includes(target.target)) {
|
|
540
|
+
if (targetFrame.src.includes(target.href)) {
|
|
538
541
|
// if (targetFrame.src === target.href) {
|
|
539
542
|
e.preventDefault()
|
|
540
543
|
e.stopPropagation()
|
|
@@ -578,6 +581,10 @@ console.log({ type, index })
|
|
|
578
581
|
"allow",
|
|
579
582
|
"clipboard-read *; clipboard-write *; accelerometer *; ambient-light-sensor *; autoplay *; battery *; camera *; display-capture *; gamepad *; geolocation *; gyroscope *; hid *; identity-credentials-get *; microphone *; midi *; otp-credentials *; serial *;"
|
|
580
583
|
)
|
|
584
|
+
frame.contentWindow.prompt = function(a, b) {
|
|
585
|
+
console.log("prompt1", { a, b })
|
|
586
|
+
return prompt(a, b)
|
|
587
|
+
}
|
|
581
588
|
document.querySelector("main").appendChild(frame)
|
|
582
589
|
loaded[target.target] = true
|
|
583
590
|
}
|
|
@@ -684,6 +691,10 @@ const addTab = async (url) => {
|
|
|
684
691
|
"clipboard-read *; clipboard-write *; accelerometer *; ambient-light-sensor *; autoplay *; battery *; camera *; display-capture *; gamepad *; geolocation *; gyroscope *; hid *; identity-credentials-get *; microphone *; midi *; otp-credentials *; serial *;"
|
|
685
692
|
)
|
|
686
693
|
document.querySelector("main").appendChild(frame)
|
|
694
|
+
frame.contentWindow.prompt = function(a, b) {
|
|
695
|
+
console.log("prompt", { a, b })
|
|
696
|
+
return prompt(a, b)
|
|
697
|
+
}
|
|
687
698
|
|
|
688
699
|
await syncTabs()
|
|
689
700
|
|