colazo / enhancejs

Automatically exported from code.google.com/p/enhancejs
Other
0 stars 0 forks source link

Add option for a media toggle link, which would switch between media types. #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This option could allow you to specify media types that can be toggled by the 
users by clicking a link (similar to the low-fi/hi-fi 
link).

Syntax might look something like this:

enhance.toggleMedia(['screen', 'screen and (max-device-width: 480px)']);

toggleMedia could accept an array of media types to toggle upon refreshing the 
page, essentially switching which files are 
directed to which device. This would allow us to create a link that says "View 
mobile site", and clicking it would set a cookie of 
something like:

enhancetogglemedia="['screen', 'screen and (max-device-width: 480px)']";

...and then refresh the page. with that toggle applied, a different link could 
be appended that says "View desktop site", which 
would just remove that cookie and refresh the page, restoring it back to where 
it started.

Original issue reported on code.google.com by scottj...@gmail.com on 2 Jun 2010 at 4:29

GoogleCodeExporter commented 8 years ago
Implemented in r105. Soon to be merged to trunk!

Original comment by scottj...@gmail.com on 10 Jun 2010 at 2:59