Skip to content

Commit

Permalink
Update twitter.js
Browse files Browse the repository at this point in the history
add new domain name to allowed hosts
  • Loading branch information
cooljeanius authored Sep 22, 2024
1 parent 9c17ad0 commit 6f84fd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Twitter {

// Links to other tweets
const urlObj = new URL(displayUrl);
const allowedHosts = ["twitter.com"];
const allowedHosts = ["twitter.com", "x.com"];
if(allowedHosts.includes(urlObj.host) && displayUrl.indexOf("/status/") > -1) {
displayUrl = displayUrl.substring("https://twitter.com/".length);
displayUrl = displayUrl.replace("/status/", "/");
Expand Down

0 comments on commit 6f84fd3

Please sign in to comment.