User:Daask/scripts/Some MOSNUM dates.js

This is an old revision of this page, as edited by Daask (talk | contribs) at 21:18, 27 March 2017 (Make functional!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// For documentation, see
// https://en.wikipedia.org/wiki/User:Sondra.kinsey/scripts/Some_MOSNUM_dates

toolbar_items = $('#p-tb li').map(function(i,el){return el.id}).toArray();
importScript('User:Ohconfucius/script/MOSNUM dates.js');
toolbar_items_after=$('#p-tb li').map(function(i,el){return el.id}).toArray();
new_items = toolbar_items_after.filter(function(val){return !toolbar_items.includes(val)});
keep_items = ['dmy-unitfixer', 'mdy-unitfixer'];
hidden_items = new_items.filter(function(val){return !keep_items.includes(val)});
for (let i of hidden_items) {
  $('#' + i).hide();
}