User:Jdlrobson/infobox/templates.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Jdlrobson/infobox/templates. |
// <syntaxhighlight lang=javascript>
var msgs = {"mobile-frontend-time-precision-Gannum":"$1 billion years CE","mobile-frontend-time-precision-Mannum":"$1 million years CE","mobile-frontend-time-precision-annum":"$1 years CE","mobile-frontend-time-precision-millennium":"$1 thousand years CE","mobile-frontend-time-precision-century":"$1 hundred years CE","mobile-frontend-time-precision-10annum":"$1s","mobile-frontend-time-precision-0annum":"$1","mobile-frontend-time-precision-BCE-Gannum":"$1 billion years BCE","mobile-frontend-time-precision-BCE-Mannum":"$1 million years BCE","mobile-frontend-time-precision-BCE-annum":"$1 years BCE","mobile-frontend-time-precision-BCE-millennium":"$1 thousand years BCE","mobile-frontend-time-precision-BCE-century":"$1 hundred years BCE","mobile-frontend-time-precision-BCE-10annum":"$1s BCE","mobile-frontend-time-precision-BCE-0annum":"$1 BCE","january-date":"January $1","february-date":"February $1","march-date":"March $1","april-date":"April $1","may-date":"May $1","june-date":"June $1","july-date":"July $1","august-date":"August $1","september-date":"September $1","october-date":"October $1","november-date":"November $1","december-date":"December $1"};
var templates = {
"Infobox.hogan": "\u003Cdiv\u003E\n\t{{^rows}}\n\t{{^isEmptyInfobox}}\n\t{{#moreButton}}{{\u003Ebutton}}{{/moreButton}}\n\t{{/isEmptyInfobox}}\n\t{{/rows}}\n\t{{#isEmptyInfobox}}\n\tNo further information is available.\n\t{{/isEmptyInfobox}}\n\u003C/div\u003E\n\n{{{spinner}}}\n{{#rows.length}}\n\u003Cdiv class=\"wikidata-infobox-content\"\u003E\n\t{{#rows}}\n\t{{^isEmpty}}\n\t\u003Cdiv class=\"{{className}} wikidata-infobox-row\"\u003E\n\t\t{{#label}}\n\t\t\u003Clabel\u003E{{label}}\u003C/label\u003E\n\t\t{{/label}}\n\t\t\u003Cdiv class='wikidata-infobox-values'\u003E\n\t\t\t{{#values}}\n\t\t\t\u003Cspan\u003E\n\t\t\t{{#url}}\u003Ca href=\"{{url}}\" data-wikidata-id={{id}}\n\t\t\t\t{{#src}}class=\"image\"{{/src}}\n\t\t\t\t\u003E{{/url}}\n\t\t\t{{#src}}\u003Cimg src=\"{{src}}\" width=\"160px\"\u003E{{/src}}\n\t\t\t{{value}}\n\t\t\t{{#url}}\u003C/a\u003E{{/url}}\n\t\t\t\u003C/span\u003E\n\t\t\t{{/values}}\n\t\t\u003C/div\u003E\n\t\u003C/div\u003E\n\t{{/isEmpty}}\n\t{{/rows}}\n\u003C/div\u003E\n\u003Cul class=\"hlist\"\u003E\n\t{{#commonsLink}}\u003Cli\u003E{{\u003Eanchor}}\u003C/li\u003E{{/commonsLink}}\n\t{{#viewLink}}\u003Cli\u003E{{\u003Eanchor}}\u003C/li\u003E{{/viewLink}}\n\t\u003Cli\u003E{{#editButton}}{{\u003Ebutton}}{{/editButton}}\u003C/li\u003E\n\u003C/ul\u003E\n{{/rows.length}}\n",
"EditorOverlayHeader.hogan": "\u003Cdiv class=\"overlay-header initial-header\"\u003E\n\t\u003Cul\u003E\n\t\t\u003Cli\u003E{{{backButton}}}\u003C/li\u003E\n\t\u003C/ul\u003E\n\t\u003Cdiv class=\"overlay-title\"\u003E\n\t\t\u003Ch2\u003E{{{title}}}\u003C/h2\u003E\n\t\u003C/div\u003E\n\t\u003Cdiv class=\"overlay-action\"\u003E\n\t\t\u003Cbutton class=\"submit\"\u003E{{saveMsg}}\u003C/button\u003E\n\t\u003C/div\u003E\n\u003C/div\u003E\n",
"EditorOverlayContent.hogan": "\u003Cdiv class=\"content\"\u003E\n\t{{{spinner}}}\n\t\u003Cdiv class=\"editor-interface hidden\"\u003E\n\t\t{{{descriptionLabel}}}\n\t\t\u003Cinput class=\"mw-ui-input mw-ui-block description\" value=\"{{description}}\"\u003E\n\t\t{{#rows}}\n\t\t\t\t\u003Cstrong\u003E{{label}}\u003C/strong\u003E\n\t\t\t\t\u003Cdiv class=\"values\" data-type=\"{{type}}\" data-id=\"{{id}}\"\u003E\n\t\t\t\t\t{{#values}}\n\t\t\t\t\t\t\u003Cdiv\u003E{{value}}\u003C/div\u003E\n\t\t\t\t\t{{/values}}\n\t\t\t\t\t\u003Cdiv class=\"editable-field\"\u003EN/A\u003C/div\u003E\n\t\t\t\t\u003C/div\u003E\n\t\t{{/rows}}\n\t\t\u003Cdiv class=\"menu-container\"\u003E\u003C/div\u003E\n\t\u003C/div\u003E\n\u003C/div\u003E" };
mw.templates.set( 'mobile.infobox', templates );
$.each( msgs, function ( key ) {
mw.messages.set( key, msgs[key] );
} );
// </syntaxhighlight>