User:Obl obl/common.js

// "use strict";

/* let gt_zero_selector_matches_info_recs = [];

/* function output_console_log(item) { console.log(' '.concat(item)); };

/* function output_report_each_slctr_name_n_match_count(the_array) { console.log('\nSummary: All selectors with at least 1 match: selector-name, match_number:'); the_array.forEach(output_console_log) };

/* = =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =   */

/* function remove_query_slctr_all_matches(theSelector, current_index, array) { if (current_index == 0) { console.log(`. . At remove_query_slctr_all_matches(..) for these selectors: ${array}`); } if (theSelector != '') { let node_list = document.querySelectorAll(theSelector); let selector_matches_info_str = `. . . ${node_list.length} matches for selector ${theSelector}`; console.log(selector_matches_info_str); if (node_list.length > 0) { gt_zero_selector_matches_info_recs.push(selector_matches_info_str); }   node_list.forEach((item) => {      item.remove;    }); }; }

/* function do_foreach_remove_query_slctr_all_matches(the_array) { the_array.forEach(remove_query_slctr_all_matches); }

/* = =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =   */

/* do_foreach_remove_query_slctr_all_matches([   'body.page-Main_Page #deleteconfirm',    'body.page-Main_Page #t-cite',    'body.page-Main_Page #lastmod',    'body.action-view.page-Main_Page #siteSub',    'body.action-view.page-Main_Page #contentSub',    'body.action-view.page-Main_Page h1.firstHeading',    '#f-poweredbyico',     '#f-copyrightico',    '#privacy',    '#about',    '#disclaimer',    '#contact',    '#mobileview',    '#developers',    '#statslink',    '#cookiestatement',    '#p-logo',    '#p-navigation',    '#p-search',    '#p-interaction',    '#p-tb',    '#p-coll-print_export',    '#p-wikibase-otherprojects',    '#p-lang',    '.reflist > .references > li > .reference-text > [href="/wiki/Wayback_Machine"]',    'span.reference-accessdate',

'section:empty', 'header:empty', 'div:empty', 'div:empty',

'header:empty', 'section:empty', 'div:empty', 'div:empty', ]);

/* output_report_each_slctr_name_n_match_count(gt_zero_selector_matches_info_recs);

// = =  =  =  =

/* eof placeholder */