Skip to content

Commit

Permalink
fix #559
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Sep 28, 2023
1 parent c2f5969 commit c95521b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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 (2023)",
"description": "__MSG_ext_description__",
"version": "1.8.1",
"version": "1.8.1.1",
"manifest_version": 3,
"homepage_url": "https://github.com/dimdenGD/OldTwitter",
"background": {
Expand Down
5 changes: 5 additions & 0 deletions scripts/injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ if (realPath.startsWith('/i/web/status/')) {
location.replace("/" + tweet.user.screen_name + "/status/" + tweet.id_str);
});
}
if(realPath.startsWith('/i/redirect')) {
let search = new URLSearchParams(location.search);
let url = search.get('url');
location.replace(url);
}
if(/^\/direct_messages\/create\/[A-z-0-9-_]{1,15}$/.test(realPath)) {
location.href = `https://twitter.com/${realPath.split("/direct_messages/create/")[1]}#dm`;
}
Expand Down

1 comment on commit c95521b

@AmarinReyny
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Please sign in to comment.