470
edits
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
$( function(){ | $( function(){ | ||
if (window.matchMedia("(max-width: 768px)").matches) { | |||
if( mw.config.get("skin") !== "minerva" ){ | |||
const currWikiUrl = new URL(window.location.href); | |||
currWikiUrl.searchParams.set('mobileaction', 'toggle_view_mobile'); | |||
window.location.replace(currWikiUrl); | |||
} | |||
} else { | |||
if( mw.config.get("skin") !== "vector" ){ | |||
const currWikiUrl = new URL(window.location.href); | |||
currWikiUrl.searchParams.set('mobileaction', 'toggle_view_desktop'); | |||
window.location.replace(currWikiUrl); | |||
} | |||
} | |||
if( mw.config.get('wgIsMainPage') ){ | if( mw.config.get('wgIsMainPage') ){ | ||
$('#firstHeading').remove(); | $('#firstHeading').remove(); | ||
Line 44: | Line 60: | ||
if( $(".wikiaudioplayer").length ){ | if( $(".wikiaudioplayer").length ){ | ||
mw.loader.load( '/index.php?title=MediaWiki:Green-audio-player.min.css&action=raw&ctype=text/css'); | mw.loader.load( '/index.php?title=MediaWiki:Green-audio-player.min.css&action=raw&ctype=text/css', 'text/css'); | ||
$.when( | $.when( | ||
mw.loader.getScript( 'https://wiki.ekatrafoundation.org/index.php?title=MediaWiki:Green-audio-player.min.js&action=raw&ctype=text/javascript' ) | mw.loader.getScript( 'https://wiki.ekatrafoundation.org/index.php?title=MediaWiki:Green-audio-player.min.js&action=raw&ctype=text/javascript' ) | ||
Line 54: | Line 70: | ||
stopOthersOnPlay: true | stopOthersOnPlay: true | ||
}); | }); | ||
$( ".wikiaudioplayer > audio").css("display", "none"); | |||
}, | }, | ||
function ( e ) { | function ( e ) { |