User:TedSwippet/BoglebotTable

(Documentation)
This template displays Boglebot tables. It uses to create the tables. Boglebot tables are rendered inside an outer container table.

Usage
All arguments except for link are optional. For more on generating values for link, see User:Glorat/BoglebotTable.
 * link: Boglebot search link, from Boglebot's Asset DB. Required.
 * title: Container table title. Optional. Default is blank at table top, and "Link" for source.
 * attributes: CSS class and style attributes for the outer container table. For example, . Optional. Default is.
 * footnote: Controls display of container table footnotes. For example, "no". Optional. Default is "yes".
 * secondary: Data transport optimization for pages that might contain a lot of Boglebot tables. Do not use this argument unless absolutely certain that it is both useful and safe. See Multiple transclusions below. Optional. Default is "no".

Multiple transclusions
This template always transcludes, to send the required JavaScript to the browser. Multiple definitions of this JavaScript source code in a single web page represent a small increase in download size, but cause no problems and no noticeable performance issues.

For a page with a large number of Boglebot tables, the added download size overhead can be reduced by passing  to all uses of this template except for its first use (strictly, except for any use will work). Note that any template using Boglebot tables should also have at least one non-secondary use of this template, so that it displays correctly in a template view.

In all cases, the safest course is to simply never use the secondary argument. The only only effect of not using it is that the server sends a small amount of identical JavaScript code with each transclusion, and the browser ignores all but one of them.

Redirecting away from www.boglebot.com
In future, there may be a need to redirect www.boglebot.com. The template contains string replacement code that will effect this without the need to edit every call site. Where this feature is not required, the string replacement code in the template does nothing.

Rendering delays
Because www.boglebot.com uses "serverless cold start", there is often a delay of a second or two before Boglebot tables are rendered. This is normal.

Modern JavaScript requirement
Generating Boglebot tables requires a browser that supports reasonably modern JavaScript. If your browser is very old, you may not see tables display, but instead a link to a www.boglebot.com URL. This link shows you the data source. However, following it in a browser that does not support modern JavaScript will still not show the table data, because this site too requires modern JavaScript.

Hopefully, this issue will be rare. As of January 2021, 90% of browsers in use today will support the required JavaScript.