Skip to content

Commit 68469f7

Browse files
committed
bump version
1 parent 8a87b02 commit 68469f7

File tree

8 files changed

+25
-7
lines changed

8 files changed

+25
-7
lines changed

layouts/header/style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ span.tweet-body-text {
15241524
-webkit-font-smoothing: antialiased;
15251525
color: #ccd6dd;
15261526
cursor: pointer;
1527-
font: 400 16px var(--icon-font);;
1527+
font: 400 16px var(--icon-font);
15281528
margin-right: 10px;
15291529
vertical-align: sub;
15301530
display: inline-block;

layouts/home/script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ setTimeout(async () => {
13371337
} else {
13381338
updateTimeline('prepend');
13391339
}
1340-
}, 60000);
1340+
}, 80000);
13411341
if(vars.timelineType.startsWith('chrono')) {
13421342
setInterval(async () => {
13431343
let tweets = (await API.timeline.getChronologicalV2()).list;

layouts/profile/script.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ async function renderProfile() {
10221022
autotranslateProfiles = [];
10231023
}
10241024
toAutotranslate = autotranslateProfiles.includes(pageUser.id_str);
1025+
document.getElementById('profile-avatar').dataset.user_id = pageUser.id_str;
10251026
document.getElementById('profile-avatar').src = `${(pageUser.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(pageUser.id_str) % 7}_normal.png`): pageUser.profile_image_url_https}`.replace('_normal.', '_400x400.');
10261027
document.getElementById('nav-profile-avatar').src = `${(pageUser.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(pageUser.id_str) % 7}_normal.png`): pageUser.profile_image_url_https}`.replace('_normal.', '_bigger.');
10271028
document.getElementById('profile-name').innerText = pageUser.name.replace(/\n/g, ' ');
@@ -1802,7 +1803,12 @@ let loadingFollowersYouKnow = false;
18021803
let followingMoreBtn, followersMoreBtn, followersYouFollowMoreBtn;
18031804

18041805
setTimeout(async () => {
1805-
if(!vars) {
1806+
console.log(3, vars);
1807+
try {
1808+
if(!vars) {
1809+
await loadVars();
1810+
}
1811+
} catch(e) {
18061812
await loadVars();
18071813
}
18081814
while(!LOC || !LOC.january) {

layouts/search/script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ setInterval(async () => {
287287
setTimeout(() => newTweets.click(), 10);
288288
}
289289
}
290-
}, 60000 * 2);
290+
}, 60000 * 3);
291291

292292
setTimeout(async () => {
293293
if(!vars) {

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Old Twitter Layout (2024)",
33
"description": "__MSG_ext_description__",
4-
"version": "1.8.5.1",
4+
"version": "1.8.5.2",
55
"manifest_version": 3,
66
"homepage_url": "https://github.com/dimdenGD/OldTwitter",
77
"background": {

scripts/config.js

+2
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,6 @@ async function loadVars() {
225225
});
226226
});
227227
};
228+
229+
console.log(1, vars);
228230
loadVars();

scripts/injection.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,14 @@ let page = realPath === "" ? pages[0] : pages.find(p => (!p.exclude || !p.exclud
521521
if (!page) return;
522522

523523
// wait for variables
524-
if(!vars) {
524+
try {
525+
if(!vars) {
526+
await varsPromise;
527+
}
528+
} catch(e) {
525529
await varsPromise;
526530
}
531+
console.log(2, vars);
527532
if(vars.darkMode || (vars.timeMode && isDark())) {
528533
isDarkModeEnabled = true;
529534
switchDarkMode(true);

scripts/twchallenge.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ function solveChallenge(path, method) {
3131
if(!solverIframe || !solverIframe.contentWindow || !solverReady) {
3232
solveQueue.push({ id, path, method })
3333
} else {
34-
solverIframe.contentWindow.postMessage({ action: 'solve', id, path, method }, '*');
34+
try {
35+
solverIframe.contentWindow.postMessage({ action: 'solve', id, path, method }, '*');
36+
} catch(e) {
37+
console.error(`Error sending challenge to solver:`, e);
38+
reject(e);
39+
}
3540
// setTimeout(() => {
3641
// if(solveCallbacks[id]) {
3742
// solveCallbacks[id].reject('Solver timed out');

0 commit comments

Comments
 (0)