User:Alex 21/script-updateepisodes
User:Alex 21/script-updateepisodes.js is a script that updates a television of list-of-episodes page when the most recent episode airs. It updates |num_episodes=
in {{Infobox television}}, |RTitle=
in {{Episode list}}, and the date in {{Aired episodes}}.
Installation
[edit]To install the script, add:
importScript('User:Alex 21/script-functions.js'); importScript('User:Alex 21/script-updateepisodes.js');
>>> User:Alex 21/script-functions.js is required to include multiple shared functions, and the custom "TV Scripts" header, many of which are used identically in a few of my other scripts - you only need to include it in Special:MyPage/common.js once. Follow the instructions at User:Alex 21/script-functions for installing scripts by Alex 21. <<<
There will be a "Update episodes" link in the toolbox on the left on every article. Click it while in editing mode for the whole article in both the main article and list of episode article (if one exists), to update all counter parameters/templates and remove title references. Only works for the first episode that originally has a title reference (i.e. if that particular day aired a double episode, click the link twice).
Usages
[edit]Use the script on the following articles in the following order.
- Episode table exists on series' main article.
- Update main article to remove episode reference and update {{Infobox television}} episode counter.
- Episode table exists on list-of-episodes article.
- Update main article to update {{Infobox television}} episode counter.
- Update list-of-episodes article to remove episode reference and update {{Aired episodes}} date and/or episode counter.
- Episode table exists on season article, transcluded to list-of-episodes article.
- Update main article to update {{Infobox television}} episode counter.
- Update the season article first to remove episode reference and update {{Infobox television season}} episode counter; script saves the episode number and air date.
- Update list-of-episodes article second to update {{Aired episodes}} date and/or episode counter.
Bugs
[edit]Please report any bugs on the talk page of the script's creator.