UserScript | Library: DOM Window History Stack Events (pushstate/replacestate)

To complement the <window> 'popstate' event, this library adds 'pushstate'/'replacestate' events. Also adds corresponding 'onpushstate'/'onreplacestate' event handlers.

目前為 2021-05-01 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/425774/926819/UserScript%20%7C%20Library%3A%20DOM%20Window%20History%20Stack%20Events%20%28pushstatereplacestate%29.js

作者
sidneys
版本
0.0.7
建立日期
2021-05-01
更新日期
2021-05-01
尺寸
2.2 KB
授權條款
未知

Library

DOM Window History Stack Events (pushstate/replacestate)

  • Complement the 'popstate' event
  • Emits a pushstate event from window by Monkey-Patching History#pushState
  • Calls corresponding window#onpushstate event handler
  • Emits a replacestate event from window by Monkey-Patching HistoryreplaceState
  • Calls corresponding window#onreplacestate event handler