From ee89e2bc50fb971654e21d47377bd815de2f4c62 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 19 Aug 2020 13:58:37 -0700 Subject: [PATCH 1/9] fix destroy() --- Extensions/disable_gifs.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index 60314d9d9..bfb4e6e78 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -341,6 +341,7 @@ XKit.extensions.disable_gifs = new Object({ }, destroy: function() { + XKit.post_listener.remove('disable_gifs', this.react_do); $('.xkit-paused-gif, .xkit-gif-label').remove(); $('.xkit-disabled-gif').removeClass('xkit-disabled-gif'); XKit.tools.remove_css("disable_gifs"); From b5132236d9ad7b9573230938451c7eba5536208b Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 19 Aug 2020 14:47:00 -0700 Subject: [PATCH 2/9] fix z-index issue by modifying baseContainer --- Extensions/disable_gifs.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index bfb4e6e78..a94cc3e3b 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -22,13 +22,15 @@ XKit.extensions.disable_gifs = new Object({ } }, - run: function() { + run: async function() { this.running = true; if (XKit.page.react) { XKit.post_listener.add('disable_gifs', this.react_do); this.react_do(); + await XKit.css_map.getCssMap(); + XKit.tools.add_css(` figure:hover .xkit-paused-gif, figure:hover .xkit-gif-label { @@ -46,6 +48,9 @@ XKit.extensions.disable_gifs = new Object({ left: 5px; z-index: 2; } + ${XKit.css_map.keyToCss("baseContainer")} { + z-index: 3; + } `, 'disable_gifs'); return; From 3975a343d92a9869473004274bb3d5d14000511a Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 19 Aug 2020 14:47:50 -0700 Subject: [PATCH 3/9] version bump --- Extensions/disable_gifs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index a94cc3e3b..28ed4be52 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -1,5 +1,5 @@ //* TITLE Disable Gifs **// -//* VERSION 1.0.0 **// +//* VERSION 1.0.1 **// //* DESCRIPTION Stops GIFs on dashboard **// //* DETAILS This is a very early preview version of an extension that allows you to stop the GIFs from playing on your dashboard. If you still would like to view them, you can click on the Play button on the post. Please note that for now, this extension can't stop GIFs added to text posts. **// //* DEVELOPER new-xkit **// From 7d5bccda583e2fcb4f8bdf93d9f27d49e36ece2c Mon Sep 17 00:00:00 2001 From: Marcus Date: Sat, 22 Aug 2020 14:25:26 -0700 Subject: [PATCH 4/9] + animate gifs preference; - hide completely preference --- Extensions/disable_gifs.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index 28ed4be52..e96c4a3ee 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -15,6 +15,11 @@ XKit.extensions.disable_gifs = new Object({ slow: true, preferences: { + "hover": { + text: "Animate gifs when you mouse over them", + default: true, + value: true + }, "hide_completely": { text: "Completely hide posts with GIFs.", default: false, @@ -32,10 +37,6 @@ XKit.extensions.disable_gifs = new Object({ await XKit.css_map.getCssMap(); XKit.tools.add_css(` - figure:hover .xkit-paused-gif, - figure:hover .xkit-gif-label { - display: none; - } .xkit-gif-label { color: white; background-color: black; @@ -51,8 +52,20 @@ XKit.extensions.disable_gifs = new Object({ ${XKit.css_map.keyToCss("baseContainer")} { z-index: 3; } + .xkit--react .xkit-extension-setting[data-extension-id="disable_gifs"][data-setting-id="hide_completely"] { + display: none; + } `, 'disable_gifs'); + if (this.preferences.hover.value) { + XKit.tools.add_css(` + figure:hover .xkit-paused-gif, + figure:hover .xkit-gif-label { + display: none; + } + `, 'disable_gifs'); + } + return; } From 474758dc1447fe30eab9b2c51d1a6e51503aae54 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sat, 22 Aug 2020 18:14:48 -0700 Subject: [PATCH 5/9] updated details/description --- Extensions/disable_gifs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index e96c4a3ee..6689c1afe 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -1,7 +1,7 @@ //* TITLE Disable Gifs **// //* VERSION 1.0.1 **// //* DESCRIPTION Stops GIFs on dashboard **// -//* DETAILS This is a very early preview version of an extension that allows you to stop the GIFs from playing on your dashboard. If you still would like to view them, you can click on the Play button on the post. Please note that for now, this extension can't stop GIFs added to text posts. **// +//* DETAILS This extension allows you to stop the GIFs from playing on your dashboard until you place your mouse on them. **// //* DEVELOPER new-xkit **// //* FRAME false **// //* BETA false **// From 8aef528bfa43ee3a338aa7d7ddf0f95388c3be58 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 26 Aug 2020 02:19:14 -0700 Subject: [PATCH 6/9] must be more than 79 to beat shorten posts now I guess --- Extensions/disable_gifs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index 6689c1afe..fbd365e65 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -50,7 +50,7 @@ XKit.extensions.disable_gifs = new Object({ z-index: 2; } ${XKit.css_map.keyToCss("baseContainer")} { - z-index: 3; + z-index: 80; } .xkit--react .xkit-extension-setting[data-extension-id="disable_gifs"][data-setting-id="hide_completely"] { display: none; From 0d75100c00e43181069a697b6402cb1fb0dd8569 Mon Sep 17 00:00:00 2001 From: marcustyphoon Date: Fri, 28 Aug 2020 14:36:30 -0700 Subject: [PATCH 7/9] Use z-index 99 to match Shorten Posts Co-authored-by: April Sylph --- Extensions/disable_gifs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/disable_gifs.js b/Extensions/disable_gifs.js index fbd365e65..c0f0036d0 100644 --- a/Extensions/disable_gifs.js +++ b/Extensions/disable_gifs.js @@ -50,7 +50,7 @@ XKit.extensions.disable_gifs = new Object({ z-index: 2; } ${XKit.css_map.keyToCss("baseContainer")} { - z-index: 80; + z-index: 99; } .xkit--react .xkit-extension-setting[data-extension-id="disable_gifs"][data-setting-id="hide_completely"] { display: none; From 0aa3264717378a2c816b37dfc2a121e227ffa3cb Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 19 Nov 2020 14:14:08 -0800 Subject: [PATCH 8/9] empty commit to trigger new CI From 2647647e779caa37bb39cf2257006765af90ea18 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sun, 30 Jul 2023 06:18:56 -0700 Subject: [PATCH 9/9] empty commit to trigger new CI honestly this is just for the aesthetic of the PR page