<commit_before>$.Editable.prototype.refreshSpoiler = function() {
	try {
		if (document.queryCommandState('strikeThrough') === true)
			this.$editor.find('[data-cmd="spoiler"]').addClass("active")
	} catch (ex) {}
}

$.Editable.commands = $.extend($.Editable.commands, {
	spoiler: {
		title: "Spoiler",
		icon: "fa fa-exclamation-triangle",
		refresh: $.Editable.prototype.refreshSpoiler,
		undo: true,
		callback: function() {
			this.spoiler()
		}
	}
})
<commit_msg>Fix froala spoiler plugin button state<commit_after>$.Editable.prototype.refreshSpoiler = function() {
	var element = this.getSelectionElement();
	var button = this.$editor.find('[data-cmd="spoiler"]');
    if (element.tagName == 'STRIKE' || $(element).parents('strike').length) {
        button.addClass("active");
	} else {
        button.removeClass('active');
	}
}

$.Editable.commands = $.extend($.Editable.commands, {
	spoiler: {
		title: "Spoiler",
		icon: "fa fa-exclamation-triangle",
		refresh: $.Editable.prototype.refreshSpoiler,
		undo: true,
		callback: function() {
			this.spoiler();
		}
	}
})

{'fraction_non_alphanumeric': 0.18460111317254174, 'fraction_numerical': 0.0, 'mean_word_length': 4.3681592039801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4507265', 'n_tokens_mistral': 397, 'n_tokens_neox': 373, 'n_words': 59}