Skip to content

Instantly share code, notes, and snippets.

@matteoantoci
Created March 20, 2018 18:17
Show Gist options
  • Save matteoantoci/9ba8380d90e415614cf7d1cf96c0d55c to your computer and use it in GitHub Desktop.
Save matteoantoci/9ba8380d90e415614cf7d1cf96c0d55c to your computer and use it in GitHub Desktop.
Select coins on CH
(function(win) {
const $ = win.jQuery;
const symbolsToSelect = ['ETH', 'XMR', 'LTC']; // <-- CUSTOMIZE THIS!!
const $selectableCoins = $('.ms-selectable .ms-list li');
const $selectedCoins = $('.ms-selection .ms-list li');
$selectedCoins.click();
const getCoinSelector = (symbol) =>
$selectableCoins.filter(function() {
const text = $(this).text();
return text.endsWith(`(${symbol})`);
});
symbolsToSelect.forEach((symbol) => {
getCoinSelector(symbol).click();
});
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment