This is just a teaser. I will share the apps once the bug # 197381 is fixed!
TODO
Figure out a way to send the correct User Agent headers so that websites will think that they are talking to real devicesHandler overflow and scrollbar (style).Exploring an interesting idea to fix this as follows:
- Run Chrome with custom profile (using --user-data-dir)
- Install the app in that instance of the Chrome
- Run the app_host with the same custom profile
- Create a shortcut for the app on the desktop
- Edit the shortcut to point to the same profile (using --user-data-dir)
.../Default/User StyleSheets/Custom.css
- Edit the custom stylesheet at
::-webkit-scrollbar {
- And add the following CSS
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
-webkit-border-radius: 10px;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 3px;
background: rgba(128,128,128,1);
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(192,192,192,0.4);
}
--user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3"
- And using the following command line option
- Voila...notice the thin scrollbars and mobile website for ios being displayed
@echo off
- You may have to use a batch (.bat) file to invoke the app like this
cmd /c start C:\Users\name\AppData\Local\Google\Chrome\Application\app_host.exe --user-data-dir="c:\Users\name\.chriphone" --profile-directory=Default --user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3" --app-id=
- I get the following...gmail.com thinks it is talking to a real iPhone!
--user-agent="Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
- Similarly with the following user agent string:
- I get the following...gmail.com thinks it is talking to a real Galaxy S3!
Also S4:
This basically solves (albeit in a hacky way) a question that was asked on
Enjoy!
No comments:
Post a Comment