mirror of
https://gitdab.com/cadence/breezewiki.git
synced 2026-03-05 13:40:27 -05:00
show captcha correctly if page unloads
This commit is contained in:
@@ -88,7 +88,10 @@ async function cont() {
|
||||
|
||||
xhr.addEventListener("load", () => {
|
||||
console.log(xhr)
|
||||
// check for errors
|
||||
if (xhr.status === 500) return fetch(pkg.url, pkg.init).then(res => res.text()).then(error)
|
||||
// check for captcha screen
|
||||
if (xhr.responseXML.head.querySelector('script[src*="captcha.js"]')) return location.reload()
|
||||
// page -> #content
|
||||
const imported = document.importNode(xhr.responseXML.getElementById("content"), true)
|
||||
document.getElementById("content").replaceWith(imported)
|
||||
|
||||
Reference in New Issue
Block a user