Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Jul 3, 2024
1 parent 8a87b02 commit 68469f7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion layouts/header/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ span.tweet-body-text {
-webkit-font-smoothing: antialiased;
color: #ccd6dd;
cursor: pointer;
font: 400 16px var(--icon-font);;
font: 400 16px var(--icon-font);
margin-right: 10px;
vertical-align: sub;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion layouts/home/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ setTimeout(async () => {
} else {
updateTimeline('prepend');
}
}, 60000);
}, 80000);
if(vars.timelineType.startsWith('chrono')) {
setInterval(async () => {
let tweets = (await API.timeline.getChronologicalV2()).list;
Expand Down
8 changes: 7 additions & 1 deletion layouts/profile/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ async function renderProfile() {
autotranslateProfiles = [];
}
toAutotranslate = autotranslateProfiles.includes(pageUser.id_str);
document.getElementById('profile-avatar').dataset.user_id = pageUser.id_str;
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.');
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.');
document.getElementById('profile-name').innerText = pageUser.name.replace(/\n/g, ' ');
Expand Down Expand Up @@ -1802,7 +1803,12 @@ let loadingFollowersYouKnow = false;
let followingMoreBtn, followersMoreBtn, followersYouFollowMoreBtn;

setTimeout(async () => {
if(!vars) {
console.log(3, vars);
try {
if(!vars) {
await loadVars();
}
} catch(e) {
await loadVars();
}
while(!LOC || !LOC.january) {
Expand Down
2 changes: 1 addition & 1 deletion layouts/search/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ setInterval(async () => {
setTimeout(() => newTweets.click(), 10);
}
}
}, 60000 * 2);
}, 60000 * 3);

setTimeout(async () => {
if(!vars) {
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.5.1",
"version": "1.8.5.2",
"manifest_version": 3,
"homepage_url": "https://github.com/dimdenGD/OldTwitter",
"background": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,6 @@ async function loadVars() {
});
});
};

console.log(1, vars);
loadVars();
7 changes: 6 additions & 1 deletion scripts/injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,14 @@ let page = realPath === "" ? pages[0] : pages.find(p => (!p.exclude || !p.exclud
if (!page) return;

// wait for variables
if(!vars) {
try {
if(!vars) {
await varsPromise;
}
} catch(e) {
await varsPromise;
}
console.log(2, vars);
if(vars.darkMode || (vars.timeMode && isDark())) {
isDarkModeEnabled = true;
switchDarkMode(true);
Expand Down
7 changes: 6 additions & 1 deletion scripts/twchallenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ function solveChallenge(path, method) {
if(!solverIframe || !solverIframe.contentWindow || !solverReady) {
solveQueue.push({ id, path, method })
} else {
solverIframe.contentWindow.postMessage({ action: 'solve', id, path, method }, '*');
try {
solverIframe.contentWindow.postMessage({ action: 'solve', id, path, method }, '*');
} catch(e) {
console.error(`Error sending challenge to solver:`, e);
reject(e);
}
// setTimeout(() => {
// if(solveCallbacks[id]) {
// solveCallbacks[id].reject('Solver timed out');
Expand Down

0 comments on commit 68469f7

Please sign in to comment.