pinokiod 3.9.19 → 3.9.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.9.19",
3
+ "version": "3.9.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1020,51 +1020,20 @@ body.dark .appcanvas {
1020
1020
  // }
1021
1021
  }
1022
1022
  const renderSelection = (e, force) => {
1023
- console.log("renderSelection", { e, force, started_script })
1024
- // if the renderSelection was NOT caused by the user (e is null) ==> automatic execution
1025
- // and the user has already interacted with the page, don't renderselection
1026
- console.log("> 1")
1027
- // let selection
1028
- // if (interacted) {
1029
- // if (e) {
1030
- // selection = document.querySelector("[data-default]")
1031
- // } else {
1032
- // if (started_script) {
1033
- // selection = document.querySelector(`[data-key="${started_script}"]`)
1034
- // started_script = null
1035
- // } else {
1036
- // return
1037
- // }
1038
- // }
1039
- // } else {
1040
- // selection = document.querySelector("[data-default]")
1041
- // }
1042
- let init = document.querySelector("[data-init]")
1043
- if (init) {
1044
- location.href = init.href
1045
- return
1046
- }
1047
- let selection = document.querySelector("[data-default]")
1048
-
1049
- // console.log("> 3")
1050
- // let selection
1051
- // if (started_script) {
1052
- // selection = document.querySelector(`[data-filepath="${started_script}"]`)
1053
- // started_script = null
1054
- // } else {
1055
- // // if the menu has a default item, or if the url specifies a selection
1056
- // selection = document.querySelector("[data-default]")
1057
- // }
1023
+ let init = document.querySelector("[data-init]")
1024
+ if (init) {
1025
+ location.href = init.href
1026
+ return
1027
+ }
1028
+ let selection = null
1029
+ <% if (type === "run" && env.PINOKIO_SCRIPT_DEFAULT && env.PINOKIO_SCRIPT_DEFAULT.toString().toLowerCase() === "true") { %>
1030
+ selection = document.querySelector("[data-default]")
1031
+ <% } %>
1058
1032
  console.log({ selection })
1059
- // let selection = document.querySelector("[data-default]")
1060
1033
  if (selection || location.hash && location.hash.length > 0) {
1061
1034
  let target
1062
1035
  if (location.hash && location.hash.length > 0) {
1063
- // document.querySelector(".bar").classList.remove("hidden")
1064
- //let id = getTarget(location.hash.slice(1))
1065
1036
  let id = location.hash.slice(1)
1066
-
1067
-
1068
1037
  let selector
1069
1038
  if (id.startsWith("@")) {
1070
1039
  //selector = `aside [target='${id.slice(1)}']`
@@ -1372,9 +1341,7 @@ body.dark .appcanvas {
1372
1341
 
1373
1342
  }
1374
1343
  }
1375
- <% if (type === "run" && env.PINOKIO_SCRIPT_DEFAULT && env.PINOKIO_SCRIPT_DEFAULT.toString().toLowerCase() === "true") { %>
1376
1344
  renderSelection()
1377
- <% } %>
1378
1345
  //renderCursor()
1379
1346
  //Reporter()
1380
1347
  <% if (agent === "electron") { %>
@@ -1821,18 +1788,7 @@ body.dark .appcanvas {
1821
1788
  // render the selected frame only if not silent
1822
1789
  if (silent) {
1823
1790
  } else {
1824
- if (options && options.nodelay) {
1825
- } else {
1826
- // await new Promise((resolve, reject) => {
1827
- // setTimeout(() => {
1828
- // resolve()
1829
- // }, 500)
1830
- // })
1831
- }
1832
- <% if (type === "run" && env.PINOKIO_SCRIPT_DEFAULT && env.PINOKIO_SCRIPT_DEFAULT.toString().toLowerCase() === "true") { %>
1833
-
1834
- renderSelection()
1835
- <% } %>
1791
+ renderSelection()
1836
1792
  }
1837
1793
  }
1838
1794
  if (document.querySelector("#genlog")) {