🏠 Home 

Politics and War Default Declaration Replacer

Replaces the default war declaration reasons in Politics & War with different quotes


Install this script?
  1. // ==UserScript==
  2. // @name Politics and War Default Declaration Replacer
  3. // @namespace https://politicsandwar.com/nation/id=98616
  4. // @version 0.30
  5. // @description Replaces the default war declaration reasons in Politics & War with different quotes
  6. // @author Talus
  7. // @match https://politicsandwar.com/nation/war/declare/*
  8. // @license GPL-3.0-or-later
  9. // ==/UserScript==
  10. // ********************
  11. // * ADD QUOTES BELOW *
  12. // ********************
  13. // RULES:
  14. // 1. Keep quotes in alphabetical order to avoid duplicates.
  15. // 2. Maximum declaration reason length is 61 characters. ie. don't be longer than the below line
  16. // "012345678901234567890123456789012345678901234567890123456789"
  17. var QUOTES = [
  18. "Beware the thorns of our bouquet",
  19. "Our roses will bloom on your ruins",
  20. "Prickly surprise from our garden",
  21. "Thorny code runs through our veins",
  22. "Our roses cut deeper than swords",
  23. "In the garden of war, we reign",
  24. "Roses sharpened to draw first blood",
  25. "The scent of war is in our roses",
  26. "Our thorns will pierce your armor",
  27. "Our roses conceal lethal blades"
  28. ];
  29. // ******************************************************************
  30. // * DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING *
  31. // ******************************************************************
  32. var REASON_SELECTOR = "#rightcolumn > form > table > tbody > tr:nth-child(16) > td:nth-child(2) > input[type=text]";
  33. (function() {
  34. 'use strict';
  35. var randomQuoteIndex = Math.floor(Math.random() * QUOTES.length);
  36. var randomQuote = QUOTES[randomQuoteIndex];
  37. document.querySelector(REASON_SELECTOR).value = randomQuote;
  38. })();