Skip to content

Commit

Permalink
fix scroll restoration on tweets page
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Sep 24, 2023
1 parent 7c38957 commit b2be1cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions layouts/tweet/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ setTimeout(async () => {
currentLocation = location.pathname;
});

history.scrollRestoration = 'auto';

// Run
updateUserData();
updateSubpage();
Expand Down
2 changes: 1 addition & 1 deletion scripts/injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ let page = realPath === "" ? pages[0] : pages.find(p => (!p.exclude || !p.exclud
icon.id = "site-icon";
document.head.appendChild(icon);

history.scrollRestoration = 'manual'; // let's test if it'll make things better
history.scrollRestoration = 'manual';

chrome.runtime.sendMessage({
action: "inject",
Expand Down

0 comments on commit b2be1cf

Please sign in to comment.