// ==UserScript== // @namespace https://greasyfork.org/users/8637 // @name The West - Item Set Manager // @author neversleep1911 // @description Manage your sets like a boss! // @include http://*.the-west.*/game.php* // @include https://*.the-west.*/game.php* // @grant none // @version 1.0.2 // @copyright Copyright (c) 2015 neversleep1911 // @license MIT (http://opensource.org/licenses/MIT) // @downloadURL none // ==/UserScript== (function(func) { var script; script = document.createElement("script"); script.setAttribute("type", "text/javascript"); script.textContent = "(" + func.toString() + ")();"; document.body.appendChild(script); document.body.removeChild(script); })(function() { var Gui, I18n, ItemSetManager, ItemSetWindow, Recent; I18n = function() { var DEFAULT_LANGUAGE, STRINGS, language; function I18n() {} DEFAULT_LANGUAGE = "en_US"; STRINGS = { en_US: { item_set_window: { title: "Items" }, messages: { bag_is_not_loaded: "Bag is not loaded!" } }, ru_RU: { item_set_window: { title: "Предметы" }, messages: { bag_is_not_loaded: "Инвентарь не загружен!" } } }; language = DEFAULT_LANGUAGE; I18n.language = function() { return language; }; I18n.setLanguage = function(lang) { return language = STRINGS[lang] ? lang : DEFAULT_LANGUAGE; }; I18n.tr = function(id) { var prop, properties, string, _i, _len; string = STRINGS[language]; properties = id.split("."); for (_i = 0, _len = properties.length; _i < _len; _i++) { prop = properties[_i]; if ((string = string[prop]) === void 0) { break; } } return string || id; }; return I18n; }(); Gui = function() { function Gui() {} Gui.createMenuButton = function(options) { var button; if (options == null) { options = {}; } button = $("