Author: hcatlin
Description:
The mobile redirect script loads FAR after the rest of the page.
So, on the iphone, even the images in the page (after initial render) finish loading
before the redirect happens.
I have modified the redirect script to be MUCH, MUCH smaller and easier to compress.
After putting the new JS through the http://closure-compiler.appspot.com/home compiler. It ends up being like:
if(/(iPhone|iPod|Android.*Mobile|webOS|NetFront|Opera Mini|SEMC-Browser|PlayStation Portable|Nintendo Wii|BlackBerry)/.test(navigator.userAgent))if(document.cookie.indexOf("smr=t")<0&&wgNamespaceNumber>=0&&wgAction=="view"){if(wgPageName!=wgMainPageTitle.replace(/ /g,"_"))wgWikimediaMobileUrl+="/"+encodeURI(wgPageName);document.location=wgWikimediaMobileUrl};
That might work embedded. And we can certainly shorted the Regex to match with less bits.
However, you can solve this a more traditional way, if you like. ;)
-hampton.
Version: unspecified
Severity: major