You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910
  1. const original = window.history.replaceState;
  2. let previousState = null;
  3. window.history.replaceState = function (state, unused, url) {
  4. state.url = url instanceof URL ? url.toString() : url;
  5. if (JSON.stringify(state) === JSON.stringify(previousState)) {
  6. return;
  7. }
  8. original.apply(this, [state, unused, url]);
  9. previousState = state;
  10. };