Skip to content

Commit

Permalink
Added missing option for refresh button and upgraded to Pardus Option…
Browse files Browse the repository at this point in the history
…s Library v2.0.1
  • Loading branch information
Tro95 committed Apr 18, 2020
1 parent 9fa90eb commit 02660da
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
8 changes: 7 additions & 1 deletion options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
22 changes: 11 additions & 11 deletions pardus_troder.meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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==
23 changes: 12 additions & 11 deletions pardus_troder.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion ship_transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 02660da

Please sign in to comment.