mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
build: update pjax-api
This commit is contained in:
parent
3dd182460b
commit
a9ccd1703c
3 changed files with 11 additions and 8 deletions
|
|
@ -33,7 +33,7 @@
|
|||
"ini": "^1.3.5",
|
||||
"js-base64": "^2.5.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pjax-api": "^3.31.2",
|
||||
"pjax-api": "^3.33.0",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-use": "^13.8.0",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ function modify(source = '', pairs = [], loose = true) {
|
|||
throw new Error(`More than one original string found`, JSON.stringify(original))
|
||||
}
|
||||
} else {
|
||||
if (!loose) throw new Error(`Original string not found`, JSON.stringify(original))
|
||||
if (loose) console.log(`Skipped missing snippet`, original)
|
||||
else throw new Error(`Original string not found`, JSON.stringify(original))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -29,17 +30,19 @@ async function fixPJAXAPI(loose) {
|
|||
],
|
||||
// Firefox
|
||||
[
|
||||
`this.document = this.xhr.responseType === 'document' ? this.xhr.responseXML.cloneNode(true) : html_1.parse(this.xhr.responseText).extract();`,
|
||||
`this.document = this.xhr.responseType === 'document' ? this.xhr.responseXML : html_1.parse(this.xhr.responseText).extract();`,
|
||||
`this.document = this.xhr.responseXML.cloneNode(true);`,
|
||||
`this.document = this.xhr.responseXML;`,
|
||||
],
|
||||
// Chrome: modifying cross-context history state causes troubles
|
||||
// Scroll position can still be restored without this function
|
||||
[
|
||||
`
|
||||
function savePosition() {
|
||||
var _a;
|
||||
void window.history.replaceState({
|
||||
...window.history.state,
|
||||
position: {
|
||||
...(_a = window.history.state) === null || _a === void 0 ? void 0 : _a.position,
|
||||
top: window.pageYOffset,
|
||||
left: window.pageXOffset
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8454,10 +8454,10 @@ pirates@^4.0.1:
|
|||
dependencies:
|
||||
node-modules-regexp "^1.0.0"
|
||||
|
||||
pjax-api@^3.31.2:
|
||||
version "3.31.2"
|
||||
resolved "https://registry.yarnpkg.com/pjax-api/-/pjax-api-3.31.2.tgz#909d31a7238cb2555f5f3aefbbf17e7fb47ee0fc"
|
||||
integrity sha512-g46QnbcQxdzyuD2QX4b/OL+szsjWF0UQ3rKZOHZ6Xno8On8E6D68HWGjFo9LnSmB4C/li9/4x/BWdSlvjEm65g==
|
||||
pjax-api@^3.33.0:
|
||||
version "3.33.0"
|
||||
resolved "https://registry.yarnpkg.com/pjax-api/-/pjax-api-3.33.0.tgz#90e1c4d725b51d7efe17514a534f5329dfc2b15e"
|
||||
integrity sha512-E0o1NNa2ebOeKICq5efWcc9Od6CtKC1jiUPl4MWpNEuAOpEQ3381TQq8/nSyw4+biqBK5JQdb6+i0wVGhIHnJQ==
|
||||
|
||||
pkg-dir@^3.0.0:
|
||||
version "3.0.0"
|
||||
|
|
|
|||
Loading…
Reference in a new issue