Omegabait Button

Adds "omegabait please use a lit m80 firecracker as a sounding rod" to any post at the click of a button.

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

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 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         Omegabait Button
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Adds "omegabait please use a lit m80 firecracker as a sounding rod" to any post at the click of a button.
// @author       Cobson1997
// @match        https://soyjak.party/*
// @icon         https://i.imgur.com/pnoLTxP.png
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
  function insert_after(new_node, ref_node) {
    ref_node.parentNode.insertBefore(new_node, ref_node.nextSibling);
  }
  function con_cat(value)
  {
    let form_textarea = document.getElementById('body');
    form_textarea.value += value;
    form_textarea.focus();
  }
  function mass_reply() {
    let form_textarea = document.getElementById('body');
    let textarea = document.getElementById('body');
    let email = document.getElementById('email_selectbox');
    textarea.value = "omegabait please use a lit m80 firecracker as a sounding rod";
    email.value = "sage";
    form_textarea.focus();
  }
  function nlq(str){
    return str.replace(/(?:\r\n|\r|\n)/g, '\n>');
  }
  let ref_node = document.getElementById('body');
  function button_cons(value, click_event){
    let button_el = document.createElement("input");
    button_el.type = "button";
    button_el.value = value;
    button_el.addEventListener("click", click_event, false);
    insert_after(button_el, ref_node);
  }
  button_cons("Bait", mass_reply);
})();