pinokiod 1.0.34 → 1.0.36

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.34",
3
+ "version": "1.0.36",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -511,9 +511,15 @@ const renderCursor = () => {
511
511
  const nav = (type) => {
512
512
  let targetFrame = document.querySelector("iframe:not(.hidden)")
513
513
  if (type === "back") {
514
- targetFrame.contentWindow.history.back()
514
+ // targetFrame.contentWindow.history.back()
515
+ targetFrame.contentWindow.postMessage({
516
+ action: "back"
517
+ }, "*")
515
518
  } else if (type === "forward") {
516
- targetFrame.contentWindow.history.forward()
519
+ // targetFrame.contentWindow.history.forward()
520
+ targetFrame.contentWindow.postMessage({
521
+ action: "forward"
522
+ }, "*")
517
523
  }
518
524
 
519
525
 
@@ -872,7 +878,7 @@ document.querySelector("#new-tab").addEventListener("click", async (e) => {
872
878
  }
873
879
  })
874
880
  document.querySelector("#clone-tab").addEventListener("click", async (e) => {
875
- const url = e.target.getAttribute("data-href")
881
+ const url = document.querySelector("#clone-tab").getAttribute("data-href")
876
882
  if (url && url.trim().length > 0) {
877
883
  console.log("url", url)
878
884
  const { tab, frame } = await addTab(url)