Content deleted Content added
(bot/CD) |
(bot/CD) |
||
Line 351:
var version = "0.6.0";
var gitAbbrevHash = "
var gitBranch = "main";
var gitDate = "
var gitVersion = "0.6.0+
/**
Line 6,264:
*/
function performHacks () {
var _a;
const HtmlEmitter = (_a = mw.jqueryMsg.HtmlEmitter) !== null && _a !== void 0 ? _a : {
prototype: Object.getPrototypeOf(new mw.jqueryMsg.Parser().emitter)
};
// This applies the {{int:message}} parser function with "MediaWiki:". This
// is due to VisualEditor using "MediaWiki:" in message values instead of "int:"
/**
* Performs a simple if check. Works just like the Extension:ParserFunctions
Line 6,280 ⟶ 6,284:
* @return see function description
*/
var _a, _b;
return (nodes[0].trim() ? ((_a = nodes[1]) !== null && _a !== void 0 ? _a : '') : ((_b = nodes[2]) !== null && _b !== void 0 ? _b : ''));
Line 6,290 ⟶ 6,294:
*
* @param nodes
* @return `{{text}}`
*/
return `{{${nodes.join('|')}}}`;
};
Line 6,299 ⟶ 6,303:
*
* @param nodes
* @return `{{text}}`
*/
return `{{subst:${nodes.map((v) => typeof v === 'string' ? v : v.text()).join('|')}}}`;
};
Line 6,310 ⟶ 6,314:
* @see https://www.mediawiki.org/wiki/Help:Magic_words#URL_data
* @param nodes
* @return `/wiki/{page}?{query}`
*/
return mw.util.getUrl(nodes[0]) + '?' + nodes[1];
};
|