User:Inductiveload/common.js

From Wikisource
Jump to navigation Jump to search
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Cmd-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (Cmd-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences

For details and instructions about other browsers, see Wikipedia:Bypass your cache.

mw.loader.load( 'https://localhost:5555/wsjs/common.js' );

/**
 * Add several tools for editing typography like diacritics and letter case.
 * @see https://en.wikisource.org/wiki/Wikisource:TemplateScript
 */
//mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:TemplateScript/typography.js&action=raw&ctype=text/javascript');


/************
**
** Inductiveload's custom JS.
**
** Anything that is imported from http://wsjs is served from my local machine for development purposes, and won't be accessible to you. If want to see more of
** it, leave me a note and I'll update the Wikisource equivalent.
**
**********/

//importScript('User:Inductiveload/Roman numerals.js');
//importScript('User:Inductiveload/Running header.js');

/*mw.loader.load('//wikisource.org/w/index.php?title=MediaWiki:OCR.js&action=raw&ctype=text/javascript'); //fixed, now in ste js

$.getScript( 'http://wsjs/tablesorter.js' );


//Visibility toggling

//importScript('User:Inductiveload/Visibility.js');


//VIAF data grabber
$.getScript( 'http://wsjs/addVIAFdata.js' );
//importScript('MediaWiki:Gadget-addViafData.js');

//Bookmaker pagelist generator
$.getScript( 'http://wsjs/BookMaker.js' );
//importScript('User:Inductiveload/BookMaker.js');

//Edit on ctrl-click
//$.getScript( 'http://wsjs/editOnCtrlClick.js' );
importScript('User:Inductiveload/editOnCtrlClick.js');

//text resizing
//importScript('User:Candalua/common.js');
//importScript('User:Inductiveload/resizer.js');

//Dynamic layouts and pagenumbers (overriding oldWS:PageNumbers.js)
$.getScript( 'http://wsjs/PageNumbers.js' );
//importScript('User:Inductiveload/PageNumbers.js');


//Default layouts
//$.getScript( 'http://wsjs/layout_override.js' );
//importScript('User:Inductiveload/layout_override.js');
//importScript('User:Inductiveload/layout_override2.js');

//pagemnuber inlining
//$.getScript( 'http://wsjs/InlinePagenums.js' );
//importScript('User:Inductiveload/InlinePagenums.js');

//Visibility toggling
//$.getScript( 'http://wsjs/Gadget-Edittools.js' );
//$.getScript( 'http://wsjs/Gadget-EdittoolsCollapser.js' );

//Table editor
//$.getScript( 'http://wsjs/TableEditor.js' );
//importScript('User:Inductiveload/TableEditor.js');
//$.getScript( 'http://wsjs/Gadget-EdittoolsCollapser.js' );

//Utility functions
importScript('User:Inductiveload/Roman numerals.js');

//Helper scripts
importScript('User:Phe/Author fill.js');
importScript('User:Phe/Works about.js');

//Epub link generator
//$.getScript( 'http://wsjs/epubExport.js' );
importScript('User:Inductiveload/epubExport.js');

//Special Character replacement
$.getScript( 'http://wsjs/SpecialCharacters.js' );
//importScript('User:Inductiveload/SpecialCharacters.js')

//Special Character replacement
$.getScript( 'http://wsjs/MoveReason.js' );
//importScript('User:Inductiveload/MoveReason.js')

//Special Character replacement
$.getScript( 'http://wsjs/ConvertRedirects.js' );
//importScript('User:Inductiveload/ConvertRedirects.js')


//UI add-ons
$.getScript( 'http://wsjs/Jump to file.js' );
//importScript('User:Inductiveload/Jump to file.js');

//Background shader
//$.getScript( 'http://wsjs/ColourBackground.js' );
//importScript('User:Inductiveload/ColourBackground.js');

//Iamge greyscaler - broken until CORS enables at upload.wikimedia
//$.getScript( 'http://wsjs/ImageGreyscaler.js' );
//importScript('User:Inductiveload/ImageGreyscaler.js');

//$.getScript( 'http://wsjs/Fill index.js' );

//importScript('User:Inductiveload/Easy proofread.js');
//$.getScript( 'http://wsjs/Easy proofread.js' );

importScript('User:Inductiveload/Custom toolbar buttons.js');
//importScript('User:Inductiveload/Running header.js');
$.getScript( 'http://wsjs/Running header.js' );

importScript('User:Inductiveload/Hyphenated word.js');
//$.getScript( 'http://wsjs/Hyphenated word.js' );

//importScript('User:Inductiveload/braces.js');
//$.getScript( 'http://wsjs/braces.js' );


//Testing area for regex thingies
$.getScript( 'http://wsjs/regexTesting.js' );

importScript('User:Inductiveload/Regexp toolbar.js');


//Metadata script - incomplete
//$.getScript( 'http://wsjs/Metadata form.js');
//importScript('User:Inductiveload/Metadata form.js');

//// addPurge
//addOnloadHook(function () {
//    var hist; var url;
//    if (!(hist = document.getElementById('ca-history') )) return;
//    if (!(url = hist.getElementsByTagName('a')[0] )) return;
//    if (!(url = url.href )) return;
//    addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
//                   'Purge', 'ca-purge', 'Purge server cache for this page', '0');
//});

 
self.proofreadpage_disable_wheelzoom=false;

/*self.ws_layouts['Sidenotes/tables'] = {
      'text-wrap':"", 
      '#text-container':"" , 
      '#text':"", 
      '.sidenote-right':"float:right; position:relative; left:1em; top:1em; 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;",
      '.editsection':"display:none",
      '#headertemplate':"" 
};

self.ws_layouts['Layout 2 new'] = {
   '#text-wrap':"position:relative;margin-left:3em;margin-right:3em;", 
   '#text-container':"width:36em;margin:0px auto;font-family:Georgia,serif;" , 
   '#text':"text-align:justify;", 
   '.sidenote-right':"position:absolute; left:37em;width:16em;text-indent:0em;text-align:left;",
   '.sidenote-left':"position:absolute; right:37em;width:16em;text-indent:0em;text-align:right;",
   '.editsection':"display:none",
   '#headertemplate':"position:absolute; width:100%; left:0" 
};

*/