User:BurnDownBabylon/vector.js

var loc_re = new RegExp('en\.wikipedia\.org(.*)'); var ua_re = new RegExp('(A100|iPhone)');

if (navigator.userAgent.search(ua_re) != -1 && window.location.toString.search(loc_re) != -1) { window.location = ('http://en.m.wikipedia.org' + window.location.toString.match(loc_re)[1]); }