https://bugzilla.wikimedia.org/show_bug.cgi?id=27690

           Summary: Mobile Redirect
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: General/Unknown
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: hcat...@wikimedia.org
            Blocks: 27339


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to