MediaWiki:Gadget-refToolbarBase.js explained

/* jshint asi: true *//* global mw, $, CiteTB, citeTemplate, citeErrorCheck */

if (window.CiteTB

undefined)

if (typeof mw.usability

'undefined')

// Object for cite templateswindow.citeTemplate = function (templatename, shortform, basicfields, expandedfields)

/* Class for error checks FIXME: DOCS OUT OF DATE type - type of error check - current options: * 'refcheck' - apply a function on each ref individually * function should accept a ref object, return a string * 'reflist' - apply a function on the entire ref list * function should accept an array of ref objects, return an array of strings * 'search' - apply a function ro the page text * function should accept the page text as a string, return an array of strings The strings returned by the function should be valid HTML func - The function described above testname - Name of the error check, must not contain spaces desc - A short description of the test

window.citeErrorCheck = function (obj) $('head').trigger('reftoolbarbase');