User:Jon (WMF)/minerva.js

var M = mw.mobileFrontend; /*jshint unused:vars */ ( function ( M, $ ) {

function init { var collection = mw.config.get( 'wgGatherCollections' ); if ( !collection ) { return; } if ( collection[0] ) { collection = collection[0]; }		mw.loader.using( 'ext.gather.watchstar' ).done( function {			$( 'OH NOOOO! Hide it! ' )				.on( 'click', function { var api, Api = M.require( 'ext.gather.watchstar/CollectionsApi' ), promptRes = window.confirm( 'Are you sure this collection warrants hiding?' ); if ( promptRes ) { Api = api = new Api; api.hideCollection( collection.id ).done( function {							$( '#content_wrapper' ).empty.append( $( ' ' ).attr( 'src', 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Censored_rubber_stamp.svg/550px-Censored_rubber_stamp.svg.png' ) )						} );					}				} )				.css( { display: 'block', margin: 'auto' } )				.prependTo( '#content_wrapper' );		} ); }

if ( mw.config.get( 'wgTitle' ).indexOf( 'Gather' ) === 0 &		mw.config.get( 'wgNamespaceNumber' ) === -1 ) { init; } }( mw.mobileFrontend, jQuery ) );