auto-point 0.0.19 → 0.0.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.
Files changed (2) hide show
  1. package/AP/auto_point.js +4 -4
  2. package/package.json +1 -1
package/AP/auto_point.js CHANGED
@@ -167,10 +167,10 @@
167
167
  })
168
168
  // 挂载页面离开事件监听
169
169
  window.addEventListener('visibilitychange', () => {
170
- if (navigator && navigator.sendBeacon && document.visibilityState === 'hidden') {
171
- let type = "pagehide"
172
- let value = "hidden"
173
- let describe = "Webpage hidden point"
170
+ if (navigator && navigator.sendBeacon) {
171
+ let type = "visibilitychange"
172
+ let value = document.visibilityState
173
+ let describe = "Webpage visibility state is changed to: " + document.visibilityState
174
174
  this.#add_point(this.#create_active_point_data(type, value, describe))
175
175
  this.#send()
176
176
  }
package/package.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "scripts": {
14
14
  "test": "echo \"Error: no test specified\" && exit 1"
15
15
  },
16
- "version": "0.0.19"
16
+ "version": "0.0.20"
17
17
  }