zaburo / web-shell

Automatically exported from code.google.com/p/web-shell
0 stars 0 forks source link

screen size #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A feature that would be nice is the ability to set the screen size.  Something 
like

https://localhost:8022/?120x50

Rather than being stuck with the normal iPhone resolution.  Your app is far 
more useful than just an 
iPhone app.

Original issue reported on code.google.com by sdm...@gmail.com on 28 Oct 2008 at 2:06

GoogleCodeExporter commented 8 years ago
you can check if browser is a mobile browser : 

using the following lib : from ua_parser import user_agent_parser

and if you build an if else statement around result['device']  ismobile = True  
and 

def __init__(self, server_address, HandlerClass, cmd=None, env_term=None, 
ssl_enabled=True, ssl_cert=None, www_dir='www'):

else 

def __init__(self, server_address, HandlerClass, cmd=None, env_term=None, 
ssl_enabled=True, ssl_cert=None, www_dir='mobilewww'):

by the way :

print result_dict['device']
# {'is_spider': False, 'is_mobile': True, 'family': 'iPhone'}

Original comment by rabi...@gmail.com on 26 Jul 2012 at 1:46