Gitako/patches/pjax-api+3.44.0.patch
2024-07-14 16:21:51 +08:00

29 lines
1 KiB
Diff

diff --git a/node_modules/pjax-api/dist/index.js b/node_modules/pjax-api/dist/index.js
index bafa42e..9a124a2 100644
--- a/node_modules/pjax-api/dist/index.js
+++ b/node_modules/pjax-api/dist/index.js
@@ -5759,14 +5759,7 @@ function loadPosition() {
}
exports.loadPosition = loadPosition;
function savePosition() {
- window.history.replaceState({
- ...window.history.state,
- position: {
- ...window.history.state?.position,
- top: window.scrollY,
- left: window.scrollX
- }
- }, document.title);
+ return;
}
exports.savePosition = savePosition;
function isTransitable(state) {
@@ -6100,7 +6093,7 @@ class Response {
this.url = url;
this.xhr = xhr;
this.header = name => this.xhr.getResponseHeader(name);
- this.document = this.xhr.responseXML.cloneNode(true);
+ this.document = this.xhr.responseXML;
if (url.origin !== new url_1.URL(xhr.responseURL, window.location.href).origin) throw new Error(`Redirected to another origin`);
Object.defineProperty(this.document, 'URL', {
configurable: true,