Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

V.3. Variables

Andrey Bogdanov edited this page Mar 1, 2016 · 3 revisions

Contents

Note: Variables, that are used internally, are not described here.

Variables available on every page

  • lord.popups An array of lord.PopupMessage objects. Default: [] (an empty array).
  • lord.models An object-map of models used by doT.js. Populated at the page load. Default: {} (an empty object).
  • lord.partials An object-map of partials used by doT.js. Populated at the page load. Default: {} (an empty object).
  • lord.templates An object-map of templates used by doT.js. Populated at the page load. Default: {} (an empty object).
  • lord.chatDialog Holds a link to the private chat dialog if it is opened, otherwise is null. Default: null.
  • lord.lastChatCheckDate An ISO Date object representation of last private chat check date. Default: lord.getLocalObject("lastChatCheckDate", null).
  • lord.notificationQueue An array of notifications to be shown. Default: [] (an empty array).
  • lord.pageProcessors An array of functions called after the page is loaded. Default: [lord.processFomattedDate]. May be populated from the user script to add custom page processing.
  • lord.postProcessors An array of functions called after the page is loaded. Default: [lord.processFomattedDate, function() { /*an anonymous function*/ }]. May be populated from the user script to add custom posts processing.
  • lord.currentTracks An object-map of audio tracks added to the built-in player. Default: {} (an empty object). Populated on the page load.
  • lord.lastWindowSize An object-map containing the last window width and height. Default: { width: $(window).width(), height: $(window).height() }. Updated every time the window is resized.

Variables available on the board/thread/catalog/archive pages only

  • lord.postPreviews An object-map of cached post previews. Default: {} (an empty object).
  • lord.lastPostPreview The last opened post preview, or null if no preview is currently visible. Default: null.
  • lord.lastPostPreviewTimer A timer used to hide the last post preview if the mouse leaves it. Default: null.
  • lord.postPreviewMask An overlay mask added to the page when showing post previews on mobile devices. Default: null.
  • lord.movablePlayers An object-map of cached movable players. Default: {} (an empty object).
  • lord.currentMovablePlayer Currently visible movable player. Default: null.
  • lord.lastPostFormPosition The last post form position. Default: "" (an empty string). Possible values:
  • "Top" The post form was at the top of the page.
  • "Bottom" The post form was at the bottom of the page.
  • "" The post form was hidden or shown near a post (quick reply mode).
  • lord.files An array of file infos to navigate through. Default: null. Populated at the page load, and every time a post is added/edited/deleted.
  • lord.filesMap The same as lord.files, but an object-map (file href's are keys). Default: null.
  • lord.spells A list of parsed spells (post hiding/modification script). Default: null.
  • lord.worker A Web worker, created every time a page is loaded using the code: new Worker("/js/worker.js").
  • lord.customPostFormField An array-map of custom post form field generation functions. May be populated manually. Default: {} (an empty object). See public/js/echo.js for an example.
  • lord.customPostFormOption An array-map of custom post form option generation functions. May be populated manually. Default: {} (an empty object). See public/js/echo.js for an example (none of the ololord.js boards uses this variable, but is it almost the same as lord.customPostFormField).
  • lord.customEditPostDialogPart An array-map of custom edit dialog field generation functions. May be populated manually. Default: {} (an empty object). See public/js/rpg.js for an example.
  • lord.customPostHeaderPart An array-map of custom post header part generation functions. May be populated manually. Default: {} (an empty object). See public/js/soc.js for an example.
  • lord.customPostBodyPart An array-map of custom post body part generation functions. May be populated manually. Default: {} (an empty object). See public/js/rpg.js for an example.
  • lord.customPostMenuAction An array-map of custom post menu action generation functions. May be populated manually. Default: {} (an empty object). See public/js/rpg.js for an example (none of the ololord.js boards uses this variable, but is it almost the same as lord.customPostBodyPart).
Clone this wiki locally