User:DavidL/MobileView

From Meta, a Wikimedia project coordination wiki

Screenshot[edit]

MobileView gadget on french wikibooks
MobileView gadget on french wikibooks

Usage[edit]

  • Edit your global JS for all wiki projects, or your local common.js file at User:username/common.js
  • Add the following line in the Javascript page:
MobileViewConfig = { nextNodeId: 'pt-mycontris', sizeInCells:36 }

// Load gadgets
// - need full server name in URL because loaded from any project
mw.loader.load( '//fr.wikibooks.org/w/index.php?title=MediaWiki:Gadget-CommonDom.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//fr.wikibooks.org/w/index.php?title=MediaWiki:Gadget-MobileView.js&action=raw&ctype=text/javascript' );

Size of the mobile view can be changed by modifying the sizeInCells attribute.

You can move the view with the mouse by dragging the window title over the page area. The position is stored in browser cookies.