Skip to content

Commit

Permalink
Remove old if
Browse files Browse the repository at this point in the history
Thanks to the new xpath selector
  • Loading branch information
AlttiRi authored Aug 17, 2024
1 parent 94bb04f commit 407bcc6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions twitter-click-and-save.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Twitter Click'n'Save
// @version 1.12.1-2024.08.17
// @version 1.12.2-2024.08.17
// @namespace gh.alttiri
// @description Add buttons to download images and videos in Twitter, also does some other enhancements.
// @match https://twitter.com/*
Expand Down Expand Up @@ -1037,11 +1037,6 @@ function hoistFeatures() {
const shortUrl = redirectUrl.origin + redirectUrl.pathname; // remove "?amp=1"

const hrefAttr = anchor.getAttribute("href");
if (hrefAttr.startsWith("/")) {
anchor.dataset.handled = "true";
return;
}

verbose && console.log("[ujs][directLinks]", {hrefAttr, redirectUrl_href: redirectUrl.href, shortUrl});

anchor.dataset.redirect = shortUrl;
Expand Down

0 comments on commit 407bcc6

Please sign in to comment.