pinokiod 1.0.18 → 1.0.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -533,8 +533,8 @@ console.log({ type, index })
533
533
  // triggered with a click
534
534
  // do not reload iframe if the href and the src is the same
535
535
  if (target.closest(".h")) {
536
- if (targetFrame.src.includes(target.target)) {
537
- // if (targetFrame.src.includes(target.href)) {
536
+ // if (targetFrame.src.includes(target.target)) {
537
+ if (targetFrame.src.includes(target.href)) {
538
538
  // if (targetFrame.src === target.href) {
539
539
  e.preventDefault()
540
540
  e.stopPropagation()
@@ -578,6 +578,10 @@ console.log({ type, index })
578
578
  "allow",
579
579
  "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
580
  )
581
+ frame.contentWindow.prompt = function(a, b) {
582
+ console.log("prompt1", { a, b })
583
+ return prompt(a, b)
584
+ }
581
585
  document.querySelector("main").appendChild(frame)
582
586
  loaded[target.target] = true
583
587
  }
@@ -684,6 +688,10 @@ const addTab = async (url) => {
684
688
  "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
689
  )
686
690
  document.querySelector("main").appendChild(frame)
691
+ frame.contentWindow.prompt = function(a, b) {
692
+ console.log("prompt", { a, b })
693
+ return prompt(a, b)
694
+ }
687
695
 
688
696
  await syncTabs()
689
697