Re: [Pharo-users] Testing User Agent from Zinc

2018-12-10 Thread Ben Coman
cool On Tue, 11 Dec 2018 at 01:18, horrido wrote: > After much digging, I finally found the solution... > > From the req parameter in GET, I use: > > (req headers headers at: 'User-Agent') findString: 'Mobile' > > > > horrido wrote > > Is there any way I can check the user agent string from Zinc

Re: [Pharo-users] Testing User Agent from Zinc

2018-12-10 Thread horrido
After much digging, I finally found the solution... >From the req parameter in GET, I use: (req headers headers at: 'User-Agent') findString: 'Mobile' horrido wrote > Is there any way I can check the user agent string from Zinc or Teapot so > that I can determine whether the user is on a mobil

[Pharo-users] Testing User Agent from Zinc

2018-12-08 Thread horrido
Is there any way I can check the user agent string from Zinc or Teapot so that I can determine whether the user is on a mobile device? I need to modify the HTML accordingly and it's really, really messy trying to do this with JavaScript (navigator.userAgent) and conditionally inserting innerHTML.