diff --git a/layouts/home/script.js b/layouts/home/script.js index f897a1db..c921c290 100644 --- a/layouts/home/script.js +++ b/layouts/home/script.js @@ -81,7 +81,8 @@ setTimeout(() => {

(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}

`, 'changelog-modal', () => {}, () => Date.now() - opened > 1250); diff --git a/manifest.json b/manifest.json index 6448d4d6..649e5bc4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Old Twitter Layout (2024)", "description": "__MSG_ext_description__", - "version": "1.8.8.5", + "version": "1.8.9", "manifest_version": 3, "homepage_url": "https://github.com/dimdenGD/OldTwitter", "background": { diff --git a/scripts/twchallenge.js b/scripts/twchallenge.js index b3247ef9..7bde1fe2 100644 --- a/scripts/twchallenge.js +++ b/scripts/twchallenge.js @@ -48,6 +48,18 @@ function solveChallenge(path, method) { }); } +setInterval(() => { + if(!document.getElementById('loading-box').hidden && sentData && solveQueue.length) { + console.log("Something's wrong with the challenge solver, reloading", solveQueue); + solverIframe.remove(); + solverIframe = document.createElement('iframe'); + solverIframe.style.display = 'none'; + solverIframe.src = chrome.runtime.getURL(`sandbox.html`); + document.getElementById('injected-body').appendChild(solverIframe); + initChallenge(); + } +}, 2000); + window.addEventListener('message', e => { if(e.source !== solverIframe.contentWindow) return; let data = e.data;