Created
February 2, 2017 03:58
-
-
Save anonymous/279204ae7a74a17ba82f651e7e4655c6 to your computer and use it in GitHub Desktop.
Markup in comments on Toster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @author nirvimel | |
// @name Markup in comments on Toster | |
// @namespace toster_markup_in_comments | |
// @description Patch for toster.ru allowing use a markup in comments | |
// @include https://toster.ru/q/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// | |
/* jshint -W097 */ | |
// | |
"use strict"; | |
// | |
$(function () { | |
const $wysiwyg = $('#answer_form .wysiwyg').first(); | |
if ($wysiwyg.length) { | |
$('.answer__comments form .field_wrap').each(function () { | |
$(this) | |
.prepend($wysiwyg.clone(true)) | |
.attr('role', 'wysiwyg_wrapper'); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment