User:Alex 21/script-episodetable

User:Alex 21/script-episodetable.js is a script that transforms a raw-code episode table header for television series to the templated version {{Episo…

User:Alex 21/script-episodetable.js is a script that transforms a raw-code episode table header for television series to the templated version {{Episode table}}, including suggested widths in the template code, based on averages of widths automatically calculated by HTML. This allows for proper tracking of accessibility issues through Category:Articles using Template:Episode table with invalid colour combination.

Installation

To install the script, add:

importScript('User:Alex 21/script-functions.js');
importScript('User:Alex 21/script-episodetable.js');

to Special:MyPage/common.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 "Episode table" link in the toolbox on the left on every article. This script gathers all of the episode tables on the page by specifically searching for episode lists and retrieving the table from that, and converting to {{Episode table}}. It also adds suggested widths into the templated code, based on averages of widths automatically calculated by HTML; these widths are also dynamically edited into the existing tables so that you can view how the widths will set before you implement the edits. (Note: There may be inaccurate estimations of the widths if tables for specials are also included that do not conform to the season tables. To fix this, edit the Episodes section, click Preview, and use the script then.)

Click the "Episode table" link to convert the tabular overview to the template, which will be saved in your clipboard - you will be directed to the edit page. Once in edit mode, pasted the copied episode table header over the raw code, making sure that you replace the original table's ending |} with }} to close the template, manually replacing references as you do so (the template automatically gives the parameters for the references). Save the page.

To calculate the optimum widths for tables that already have preset widths (as opposed to tables that do not include set widths), hold down your computer's "control" key when pressing the "Episode table" link in the left hand side toolbox. This resets the widths of the table columns to be unset, and calculates the optimum widths from the unset-width columns.

Bugs

Please report any bugs on the talk page of the script's creator.

See also

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.