Feature parity for unembed button.

This commit is contained in:
flash 2024-05-14 18:05:53 +00:00
parent c2159598c9
commit 331c7c49a5
3 changed files with 5 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -46,8 +46,8 @@ var Utils = (function () {
link.classList[holder.title == 'link' ? 'remove' : 'add']('js-unembed-btn'); link.classList[holder.title == 'link' ? 'remove' : 'add']('js-unembed-btn');
}; };
Utils.ToggleSpoiler = function(element) { Utils.ToggleSpoiler = function(element) {
var container = element.parentElement, var container = element.parentElement;
target = container.getElementsByTagName("span")[0]; var target = container.getElementsByTagName("span")[0];
if(container.dataset.revealed === 'yes') { if(container.dataset.revealed === 'yes') {
container.dataset.revealed = 'no'; container.dataset.revealed = 'no';
@ -58,6 +58,9 @@ var Utils = (function () {
target.textContent = container.dataset.shit; target.textContent = container.dataset.shit;
element.textContent = 'Hide'; element.textContent = 'Hide';
} }
element.classList[container.dataset.revealed == 'no' ? 'add' : 'remove']('js-embed-btn');
element.classList[container.dataset.revealed == 'no' ? 'remove' : 'add']('js-unembed-btn');
} }
Utils.SanitizeRegex = function (input) { Utils.SanitizeRegex = function (input) {
var out = ""; var out = "";