Page MenuHomeWickedGov Phorge

resetGuidedTour.js
No OneTemporary

Size
934 B
Referenced Files
None
Subscribers
None

resetGuidedTour.js

function resetGuidedTour( clickedLink ) {
const api = new mw.Api();
const redirectTarget = clickedLink.attr( 'href' );
const options = { 'checkuser-investigate-tour-seen': null };
if ( clickedLink.hasClass( 'ext-checkuser-investigate-reset-form-guided-tour' ) ) {
// Only reset the form guided tour if specifically requested.
options[ 'checkuser-investigate-form-tour-seen' ] = null;
}
api.saveOptions( options ).then( () => {
// Now that the preference is saved, refresh the page so that the
// ResourceLoader modules get loaded and the tour gets shown.
window.location.href = redirectTarget;
} );
}
/**
* Sets up event listeners for the links that reset the guided tours.
*/
function setUpResetGuidedTourLinks() {
$( '.ext-checkuser-investigate-reset-guided-tour' ).on( 'click', function ( event ) {
event.preventDefault();
resetGuidedTour( $( this ) );
} );
}
module.exports = setUpResetGuidedTourLinks;

File Metadata

Mime Type
text/plain
Expires
Aug 20 2026, 17:35 (11 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
70/6a/5470df897a40ab552d35f189fdee
Default Alt Text
resetGuidedTour.js (934 B)

Event Timeline