pinokiod 1.0.20 → 1.0.21

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.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -402,7 +402,7 @@ body.dark #new-tab {
402
402
  </div>
403
403
  <script>
404
404
  window.prompt = (a, b) => {
405
- console.log("PROMPT", { a, b })
405
+ console.log("global overridden prompt", { a, b })
406
406
  }
407
407
  let loaded = {}
408
408
  let cursorIndex = 0;
@@ -581,11 +581,12 @@ console.log({ type, index })
581
581
  "allow",
582
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 *;"
583
583
  )
584
- frame.contentWindow.prompt = function(a, b) {
585
- console.log("prompt1", { a, b })
586
- return prompt(a, b)
587
- }
588
584
  document.querySelector("main").appendChild(frame)
585
+ frame.onload = () => {
586
+ frame.contentWindow.prompt = (a, b) => {
587
+ console.log("1 overridden prompt", { a, b })
588
+ }
589
+ }
589
590
  loaded[target.target] = true
590
591
  }
591
592
  } else {
@@ -691,9 +692,10 @@ const addTab = async (url) => {
691
692
  "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 *;"
692
693
  )
693
694
  document.querySelector("main").appendChild(frame)
694
- frame.contentWindow.prompt = function(a, b) {
695
- console.log("prompt", { a, b })
696
- return prompt(a, b)
695
+ frame.onload = () => {
696
+ frame.contentWindow.prompt = (a, b) => {
697
+ console.log("2 overridden prompt", { a, b })
698
+ }
697
699
  }
698
700
 
699
701
  await syncTabs()