User:CES1596/common.js

From Wikisource
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// PageNumbers loader
self.ws_messages = { 
	'optlist':'Display Options',
	'hide_page_numbers':'Page links hidden',
	'show_page_numbers':'Page links displayed'
}
self.ws_layouts = {};
self.ws_layouts['Layout 1'] = {
	'#text-wrap': 'position:relative; margin-left:3em;',
	'#text-container': '', 
	'#text': 'text-align:justify; width:auto;', 
	'.sidenote-right': 'float:right; margin:0.5em; padding:3px; border:solid 1px gray; max-width:9em; text-indent:0em; text-align:left;',
	'.sidenote-left': 'float:left; margin:0.5em; padding:3px; border:solid 1px gray; max-width:9em; text-indent:0em; text-align:left;',
};
self.ws_layouts['Layout 2'] = {
	'#text-wrap': 'position:relative; margin-left:3em;',
	'#text-container': 'width:36em; margin:0 auto;', 
	'#text': 'text-align:justify;', 
	'.sidenote-right': 'position:absolute; left:37em; width:16em; text-indent:0; text-align:left;',
	'.sidenote-left': 'position:absolute; left:37em; width:16em; text-indent:0; text-align:left;',
};
self.ws_layouts['Layout 3'] = {
	'#text-wrap': 'position:relative; margin-left:3em;',
	'#text-container': 'position:relative; min-width:60em; float:left; width:100%; margin-right:-23em;', 
	'#text': 'text-align:justify; margin-right:23em; text-indent:0; padding-left:0; padding-right:0; width:auto; position:relative;',
	'.sidenote-right': 'position:absolute; right:-10em; width:9em; background-color:#eee; text-indent:0; text-align:left;',
	'.sidenote-left': 'position:absolute; right:-10em; width:9em; background-color:#eee; text-indent:0; text-align:left;',
};
// mw.loader.load('https://wikisource.org/w/index.php?title=MediaWiki:PageNumbers.js&action=raw&ctype=text/javascript');