Content deleted Content added
Polygnotus (talk | contribs) No edit summary |
Polygnotus (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4:
(function() {
'use strict';
//don't run on mobile
if (mw.config.get('skin') === 'minerva' ) {
return;
}
// Only run on watchlist page
Line 9 ⟶ 14:
return;
}
// Flag to prevent double initialization
let initialized = false;
// Create the archive checker section
Line 70 ⟶ 78:
apiCheck: true,
notFoundStrings: ['Wayback Machine has not archived that URL.']
},▼
▲ {
apiCheck: true,▼
}
];
Line 230 ⟶ 231:
}
//
function
//
if (initialized || document.getElementById('archive-checker-section')) {
return;
} const watchlistContent = document.querySelector('.mw-changeslist, #mw-content-text'); }
initialized = true;
// Add our section to the top of the watchlist page });▼
if (e.key === 'Enter') {▼
checkBtn.click();▼
}▼
});▼
});
});
}
// Initialize the checker
function init() {
// Try to add immediately if page is already loaded
addArchiveChecker();
//
const
obs.disconnect();
});▼
}
}
});
observer.observe(document.body, {
▲ childList: true,
// Cleanup observer after reasonable time
}
|