Hack Forums Multiquote

Allows you to quote multiple posts at a time.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Hack Forums Multiquote
// @namespace    Text
// @version      0.1
// @description  Allows you to quote multiple posts at a time.
// @author       DisturbedNut
// @include      *hackforums.net/showthread.php?tid=*
// @grant        none
// @require      https://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==

$(document).ready(function() {
    $(".post_management_buttons").each(function() {
        var button = $("<a>", { id: "multiquote_" + $(this).closest("table").attr("id").split("_")[1], "class": "bitButton" });
        button.text("Multiquote");
        button.css("cursor", "pointer");
        button.click(function() {
            var current = $(this);
            current.text("Loading quote...");

            $.get('/newreply.php?tid=' + $('[name="tid"]').val() + '&replyto=' + $(this).attr("id").split("_")[1], function(data) {
                $("#message").val($("#message").val() + $("#message", data).text());
                current.text("Post quoted");
                current.css("color", "#7fff63");
                current.off("click");
            });
        });

        $(this).append(button);
    });
});