pinokiod 7.3.11 → 7.3.12

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": "7.3.11",
3
+ "version": "7.3.12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12099,24 +12099,24 @@ const rerenderMenuSection = (container, html) => {
12099
12099
  }, 0)
12100
12100
  <% } %>
12101
12101
  window.addEventListener('message', async (event) => {
12102
+ if (event.data) {
12103
+ if (event.data.e === "pinokio:close-logs" || event.data.type === "pinokio:close-logs") {
12104
+ if (window.PinokioCloseLogsPage && typeof window.PinokioCloseLogsPage === "function") {
12105
+ await window.PinokioCloseLogsPage()
12106
+ }
12107
+ return
12108
+ }
12109
+ if (event.data.e === "pinokio:logs-new" || event.data.type === "pinokio:logs-new" || event.data.e === "pinokio:open-logs" || event.data.type === "pinokio:open-logs") {
12110
+ setLogsNewBadge(true)
12111
+ return
12112
+ }
12113
+ }
12102
12114
  // only process the event it's coming from pinokio
12103
12115
  let origin = event.origin
12104
12116
  if (origin) {
12105
12117
  let port = new URL(origin).port || 80
12106
12118
  if (String(port) === String(location.port) || /https:\/\/.*pinokio\..*(localhost|co)/.test(origin)) {
12107
- //if (String(port) === "<%=port%>" || /https:\/\/pinokio\..*localhost/.test(origin)) {
12108
- //if (String(port) === "<%=port%>") {
12109
- if (event.data) {
12110
- if (event.data.e === "pinokio:close-logs" || event.data.type === "pinokio:close-logs") {
12111
- if (window.PinokioCloseLogsPage && typeof window.PinokioCloseLogsPage === "function") {
12112
- await window.PinokioCloseLogsPage()
12113
- }
12114
- return
12115
- }
12116
- if (event.data.e === "pinokio:logs-new" || event.data.type === "pinokio:logs-new" || event.data.e === "pinokio:open-logs" || event.data.type === "pinokio:open-logs") {
12117
- setLogsNewBadge(true)
12118
- return
12119
- }
12119
+ if (event.data) {
12120
12120
  if (event.data.action) {
12121
12121
  if (event.data.action.type === "newtab") {
12122
12122
  addTab(event.data.action.url)