🏠 Home 

PnW Create Trade Offer Auto Fill

Auto fill create trade offer form


Install this script?
// ==UserScript==
// @name           PnW Create Trade Offer Auto Fill
// @description    Auto fill create trade offer form
// @include        https://politicsandwar.com/nation/trade/create/
// @version        0.0.2
// @namespace https://greasyfork.org/users/3941
// ==/UserScript==
if (!window.location.hash) return;
var hash = window.location.hash;
var pattern = /^#r([a-zA-Z]+)a([0-9]+)?$/;
var r###lt = hash.match(pattern);
if (r###lt === null) return;
var res = r###lt[1],
amount = r###lt[2];
jQuery(document).find('input[name="offeramount"]').attr("value", amount);
jQuery(document).find('option[value="' + res + '"]').attr("selected", "selected");