您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show a submit button in the Report popup.
当前为
- // ==UserScript==
- // @name TagPro Report Submit Button
- // @description Show a submit button in the Report popup.
- // @author Ko
- // @version 1.1
- // @include *.koalabeast.com:*
- // @include *.jukejuice.com:*
- // @include *.newcompte.fr:*
- // @supportURL https://www.reddit.com/message/compose/?to=Wilcooo
- // @website https://redd.it/no-post-yet
- // @license MIT
- // @namespace https://greasyfork.org/users/152992
- // ==/UserScript==
- tagpro.ready(function() {
- // Find the existing popup, selection dropdown and cancel button.
- var player = () => $("div#kick").attr("data-id"),
- select = $("#kickSelect"),
- cancel = $("#kickCancelButton");
- // Remove the event handler that votes on selecting a reason
- select.unbind("change");
- // Clone the "Cancel" button right above it.
- var submit = cancel.clone(true).insertBefore(cancel)
- // Change the ID and text to "Submit" of the cloned button.
- submit.prop("id", "kickSubmitButton").text("Submit");
- // Make a click on the button send a report
- submit.click(function(t) {
- tagpro.socket.emit("kick", {
- playerId: parseInt(player()),
- reason: parseInt(select.val())
- });
- });
- });