Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(removing code for test) |
|||
| 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. */ | ||
| − | + | if(document.URL.search("mobile") == -1) | |
{ | { | ||
| + | /* unused, but left in for documentation | ||
var ua = navigator.userAgent; | var ua = navigator.userAgent; | ||
| − | + | if( ua.match(/Android/i) | |
|| ua.match(/webOS/i) | || ua.match(/webOS/i) | ||
|| ua.match(/iPhone/i) | || ua.match(/iPhone/i) | ||
| Line 11: | Line 12: | ||
|| ua.match(/Windows Phone/i) | || ua.match(/Windows Phone/i) | ||
|| ua.match(/Bada/i) | || ua.match(/Bada/i) | ||
| − | || ua.match(/Symbian/i))*/ | + | || ua.match(/Symbian/i)) */ |
| − | if(document.documentElement.clientWidth <= 1000) | + | |
| + | /*if(document.documentElement.clientWidth <= 1000) | ||
{ | { | ||
window.location.replace(document.URL + "?useformat=mobile"); | window.location.replace(document.URL + "?useformat=mobile"); | ||
| − | } | + | }*/ |
} | } | ||
| − | |||
Revision as of 21:02, 6 April 2013
/* Any JavaScript here will be loaded for all users on every page load. */
if(document.URL.search("mobile") == -1)
{
/* unused, but left in for documentation
var ua = navigator.userAgent;
if( ua.match(/Android/i)
|| ua.match(/webOS/i)
|| ua.match(/iPhone/i)
|| ua.match(/iPod/i)
|| ua.match(/BlackBerry/i)
|| ua.match(/Windows Phone/i)
|| ua.match(/Bada/i)
|| ua.match(/Symbian/i)) */
/*if(document.documentElement.clientWidth <= 1000)
{
window.location.replace(document.URL + "?useformat=mobile");
}*/
}