Omegabait Button

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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);
})();