FANDOM


CustomGalleryButton allows customization of the text displayed on the button which appears below galleries.

Usage

Options

To customize the button for your wiki, add one or more of these lines above your script imports.

  • Change the button's text (default 'Add photo / Edit gallery'):
window.galleryButtonText = 'Button Text';
window.galleryButtonIcon = 'Link to image file';
  • Hide the icon (default 'false'):
window.galleryButtonIconHidden = true;

Be careful not to remove any surrounding punctuation, such as ' or ;

Using configuration options with Fandom Developers Wiki scripts

The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importScriptPage('AjaxRC/code.js','dev');
 
// 2. AjaxRC configuration option
var ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
var ajaxRefresh = 30000;
 
// 2. AjaxRC import statement
importScriptPage('AjaxRC/code.js','dev');

Version history (major changes)

  • 1.0 – Nov 2, 2013: Initial release
  • 1.1 – Nov 9, 2013: Added options to change or hide icon.
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+