MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
function isMobile() { | |||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); | |||
} | |||
if (!isMobile()) { | |||
/* Taken from MD wiki lol */ | /* Taken from MD wiki lol */ | ||
Line 10: | Line 16: | ||
.attr('href', 'https://www.youtube.com/watch?v=MFxGcb_XuT0') | .attr('href', 'https://www.youtube.com/watch?v=MFxGcb_XuT0') | ||
); | ); | ||
} |
Revision as of 16:25, 2 January 2024
/* Any JavaScript here will be loaded for all users on every page load. */ function isMobile() { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); } if (!isMobile()) { /* Taken from MD wiki lol */ $('#ca-talk').append( $('<a/>').addClass('hover-community-header-wrapper') .append($('<div/>') .addClass('wgp-ep-msg') .text('Click here to view the latest episode!') ) .attr('href', 'https://www.youtube.com/watch?v=MFxGcb_XuT0') ); }