Awesome! I've made some further updates, and there's now a toggle button on the tab bar, next to the watchlist star, so the mobile view can be turned on and off at will.-- brion
Note that since it now uses an external stylesheet, to include the copies fromĀ my meta page now takes two imports:
// Mobile sidebar
mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&title=User:Brion_VIBBER/mobile-sidebar.js&ctype=text/javascript', 'text/javascript');
mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&title=User:Brion_VIBBER/mobile-sidebar.css&ctype=text/css', 'text/css');On Fri, Oct 10, 2014 at 10:33 PM, Prateek Saxena <psaxena@wikimedia.org> wrote:On Fri, Oct 10, 2014 at 1:15 PM, Brion Vibber <bvibber@wikimedia.org> wrote:
> This shows the currently viewed page on the mobile view in an <iframe>
> sidebar, and captures link navigation within the iframe to navigate on the
> desktop window as well.
I really like this :)
> Todo:
> * add an on/off switch
> * pretty it up
I added just an off switch and prettied it up a little. I just refresh
the page to turn it back on for now. I have an idea for putting the
size selection UI which I'll add later.
http://cl.ly/XzUa
https://meta.wikimedia.org/wiki/User:Prtksxna/common.js
https://meta.wikimedia.org/wiki/User:Prtksxna/common.css