Greasy Fork is available in English.

TagPro Report Submit Button

Show a submit button in the Report popup.

Pasang skrip ini?
Sugesti pemilik skrip

Kamu mungkin juga suka TagPro RL Chat.

Pasang skrip ini
  1. // ==UserScript==
  2. // @name TagPro Report Submit Button
  3. // @description Show a submit button in the Report popup.
  4. // @author Ko
  5. // @version 1.2
  6. // @include *.koalabeast.com:*
  7. // @include *.koalabeast.com/game
  8. // @include *.jukejuice.com:*
  9. // @include *.newcompte.fr:*
  10. // @supportURL https://www.reddit.com/message/compose/?to=Wilcooo
  11. // @license MIT
  12. // @namespace https://greasyfork.org/users/152992
  13. // ==/UserScript==
  14.  
  15. tagpro.ready(function() {
  16.  
  17. // Find the existing popup, selection dropdown and cancel button.
  18. var player = () => $("div#kick").attr("data-id"),
  19. select = $("#kickSelect"),
  20. cancel = $("#kickCancelButton");
  21.  
  22. // Remove the event handler that votes on selecting a reason
  23. select.unbind("change");
  24.  
  25. // Clone the "Cancel" button right above it.
  26. var submit = cancel.clone(true).insertBefore(cancel)
  27.  
  28. // Change the ID and text to "Submit" of the cloned button.
  29. submit.prop("id", "kickSubmitButton").text("Submit");
  30.  
  31. // Make a click on the button send a report
  32. submit.click(function(t) {
  33. tagpro.socket.emit("kick", {
  34. playerId: parseInt(player()),
  35. reason: parseInt(select.val())
  36. });
  37. });
  38. });