reddit: replace RES expano icons with reddit ones

This commit is contained in:
Shadowfacts 2016-09-09 18:33:21 -04:00
parent 69f38e6d17
commit 0a704ac051
No known key found for this signature in database
GPG Key ID: F802198A7D7F309D
1 changed files with 16 additions and 0 deletions

16
.js/reddit.com.js Normal file
View File

@ -0,0 +1,16 @@
// replace RES expando icons with reddit ones
(function() {
$("a.expando-button").each((i, el) => {
el = $(el);
if (!el.hasClass("selftext") && !el.hasClass("video")) {
el.addClass("video");
el.click(() => {
if (el.hasClass("expanded")) {
el.addClass("video");
} else {
el.addClass("video");
}
});
}
});
})();