Skip to content

Commit

Permalink
fix pages not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Aug 28, 2024
1 parent d28d6ca commit 0bd45ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion layouts/home/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ setTimeout(() => {
<h2 style="margin:0;margin-bottom:10px;color:var(--darker-gray);font-weight:300">(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}</h2>
<span id="changelog" style="font-size:14px;color:var(--default-text-color)">
<ul>
<li>Fixed retweeting</li>
<li>Fixed pages not loading without refresh sometimes</li>
<li>Added a setting to show if last tweet of person is a retweet/quote/non-existent/old in followers/following pages</li>
</ul>
</span>
`, 'changelog-modal', () => {}, () => Date.now() - opened > 1250);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
12 changes: 12 additions & 0 deletions scripts/twchallenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bd45ba

Please sign in to comment.