Jump to content

User:GhostInTheMachine/SubPages

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GhostInTheMachine (talk | contribs) at 09:18, 4 September 2020 (add a bit). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

GhostInTheMachineTalkAllBarnstarsHelpMiscModulesOtherLayoutPhotosProjectsScriptsTidyingTidyingSDUBXWIP2020-09-04 09:18:31

Purpose

The script adds a Subpages option after the Talk button on the page menu.

Articles in the main namespace cannot have sub-pages, so the option is not displayed for articles. (This is not quite true, there are some sub-pages in article space, but they tend to be old.)

Prerequisites

None.

Use

The new menu option jumps to the special page that lists sub-pages.

Installing

Add the following line to your common.js file.

{{subst:lusc|User:GhostInTheMachine/SubPages.js}}

Alternatives

Seems that this is almost the "Hello World!" script ...

Possible improvements

  • Do not display the button for category pages or files
  • Always test for subpages and then only display the button if there are some
  • Resolve the burning question of "subpages" vs. "sub-pages".

See also