diff --git a/options.js b/options.js index 71cadb8..d99e089 100644 --- a/options.js +++ b/options.js @@ -34,10 +34,16 @@ function troderOptions() { imageLeft: 'https://static.pardus.at/img/std/ships/leviathan.png', }); + ship_transfer_options_box.addBooleanOption({ + variable: 'ship2ship_enable_refresh_button', + description: 'Enable \'Refresh\' button', + defaultValue: true, + }); + ship_transfer_options_box.addBooleanOption({ variable: 'ship2ship_transfer_op_mode', description: 'Enable \'OP\' mode', - defaultValue: true + defaultValue: true, }); ship_transfer_options_box.addNumericOption({ diff --git a/pardus_troder.meta.js b/pardus_troder.meta.js index 3e262a7..3dd52be 100644 --- a/pardus_troder.meta.js +++ b/pardus_troder.meta.js @@ -2,7 +2,7 @@ // @name Pardus Troder // @namespace Tro // @author Tro (Artemis) -// @version 1.12.1 +// @version 1.12.2 // @description Trading script to assist in the buying and selling on planets and starbases // @include *.pardus.at/starbase_trade.php // @include *.pardus.at/planet_trade.php @@ -15,15 +15,15 @@ // @updateURL https://github.com/Tro95/Pardus-Troder/raw/master/pardus_troder.meta.js // @grant GM_setValue // @grant GM_getValue -// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v2.0/pardus_options_library.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/defaults.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/commodities.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/functions.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/starbase.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/planet.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/blackmarket.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/drop_cargo.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/options.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/ship_transfer.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v2.0.1/pardus_options_library.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/defaults.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/commodities.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/functions.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/starbase.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/planet.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/blackmarket.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/drop_cargo.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/options.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/ship_transfer.js // // ==/UserScript== \ No newline at end of file diff --git a/pardus_troder.user.js b/pardus_troder.user.js index 919644a..b058fb0 100644 --- a/pardus_troder.user.js +++ b/pardus_troder.user.js @@ -2,7 +2,7 @@ // @name Pardus Troder // @namespace Tro // @author Tro (Artemis) -// @version 1.12.1 +// @version 1.12.2 // @description Trading script to assist in the buying and selling on planets and starbases // @include *.pardus.at/starbase_trade.php // @include *.pardus.at/planet_trade.php @@ -15,19 +15,20 @@ // @updateURL https://github.com/Tro95/Pardus-Troder/raw/master/pardus_troder.meta.js // @grant GM_setValue // @grant GM_getValue -// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v2.0/pardus_options_library.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/defaults.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/commodities.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/functions.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/starbase.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/planet.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/blackmarket.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/drop_cargo.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/options.js -// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.1/ship_transfer.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v2.0.1/pardus_options_library.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/defaults.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/commodities.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/functions.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/starbase.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/planet.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/blackmarket.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/drop_cargo.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/options.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Troder/v1.12.2/ship_transfer.js // // ==/UserScript== +// v1.12.2 Added missing option for refresh button and upgraded to Pardus Options Library v2.0.1 // v1.12.1 Fixing ship transfer OP quantities to not excede the amount the user has // v1.12 Added quick transfer buttons and OP mode to the ship transfer page // v1.11.2 Removing unsafeWindow diff --git a/ship_transfer.js b/ship_transfer.js index ff8c5ac..905521a 100644 --- a/ship_transfer.js +++ b/ship_transfer.js @@ -8,7 +8,10 @@ function ship_transfer() { const resources_table = document.querySelector('form table.messagestyle'); get_ship_id(); - create_refresh_button(); + + if (GM_getValue(PardusOptionsUtility.getVariableName('ship2ship_enable_refresh_button'), true)) { + create_refresh_button(); + } if (GM_getValue(PardusOptionsUtility.getVariableName('ship2ship_transfer_op_mode'), true)) { preload_resources();