From 0a704ac051590346741f95fcbf48f8f736f355dd Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 9 Sep 2016 18:33:21 -0400 Subject: [PATCH] reddit: replace RES expano icons with reddit ones --- .js/reddit.com.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .js/reddit.com.js diff --git a/.js/reddit.com.js b/.js/reddit.com.js new file mode 100644 index 0000000..558221c --- /dev/null +++ b/.js/reddit.com.js @@ -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"); + } + }); + } + }); +})();