User:Polygnotus/Scripts/FindArticlesWithDuplicateRefs.js: Difference between revisions

Content deleted Content added
Created page with '// Wikipedia Duplicate Reference Finder for common.js // Adds a tool to search for articles with exact duplicate references $(document).ready(function() { // Only run on Wikipedia if (mw.config.get('wgSiteName') !== 'Wikipedia') return; // Add portlet link to toolbox mw.util.addPortletLink( 'p-tb', '#', 'Find Duplicate Refs', 'find-duplicate-refs', 'Search for articles with duplicate references'...'
 
No edit summary
Line 91:
let searchActive = false;
let searchAborted = false;
// Make searchAborted accessible to the performSearch function
window.currentSearchAborted = false;
$('#start-search').click(async function() {
Line 96 ⟶ 99:
searchActive = true;
searchAbortedwindow.currentSearchAborted = false;
$(this).prop('disabled', true);
$('#stop-search').prop('disabled', false);
Line 114 ⟶ 117:
$('#stop-search').click(function() {
searchAbortedwindow.currentSearchAborted = true;
$('#search-status').text('Search stopped by user.');
});
Line 149 ⟶ 152:
for (const article of articles) {
if (searchAbortedwindow.currentSearchAborted) break;
checkedCount++;