Skip to content

Instantly share code, notes, and snippets.

Created February 2, 2017 03:58
Show Gist options
  • Save anonymous/279204ae7a74a17ba82f651e7e4655c6 to your computer and use it in GitHub Desktop.
Save anonymous/279204ae7a74a17ba82f651e7e4655c6 to your computer and use it in GitHub Desktop.
Markup in comments on Toster
// ==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