Fandom Developers Wiki
Register
Advertisement

GlobalNavButtons replaces the default global navigation buttons (such as Games, Movies, TV, etc) with your own buttons, even dropdowns.

Configuration

Before adding the import, you need to configure your very own buttons. Add your buttons above your import script.

Each button consists of 5 items in an object, in an array.

  • text: Display text on the button
  • url: The URL of the button (if empty, leave it like )
  • isMain: if the button is the main element in a dropdown. Enter true if it is, else enter false
  • whoIsMain: if the button is a child of the dropdown, please enter the shortName of the main element, else enter false
  • shortName: A short name used in elements to customize buttons and create dropdowns


Here's an example of one stand-alone button, one dropdown menu with a link, and a link inside the dropdown.

var globalNavButtons = [
  {
    text: 'VSTF',
    url: 'https://vstf.wikia.com',
    isMain: false,
    whoIsMain: false,
    shortName: 'VSTF'
  },
  {
    text: 'Community',
    url: 'https://c.wikia.com',
    isMain: true,
    whoIsMain: false,
    shortName: 'c'
  },
  {
    text: 'Adopt',
    url: 'https://c.wikia.com/Adopt',
    isMain: false,
    whoIsMain: 'c',
    shortName: 'Adopt'
  }
];


Installation

Template:Script Install/Personal

Advertisement