Munurin millum rættingarnar hjá "MediaWiki:Common.js"

Content deleted Content added
Krinkle (kjak | íkøst)
Maintenance: Use wgIsMainPage
Krinkle (kjak | íkøst)
Maintenance: mw:RL/MGU / mw:RL/JD - mw.config.values is deprecated
Linja 269:
// </nowiki>An element with id=DisableRealTitle disables the function.
var disableRealTitle = 0; // users can disable this by making this true from their monobook.js
if (mw.config.values.get('wgIsArticle')) { // don't display the RealTitle when editing, since it is apparently inconsistent (doesn't show when editing sections, doesn't show when not previewing)
$(function() {
try {
Linja 284:
// calculate whether the title is pasteable
var verifyTitle = realTitleText.replace(/^ +/, ""); // trim left spaces
verifyTitle = verifyTitle.charAt([0)].toUpperCase() + verifyTitle.substring(1, verifyTitle.length); // uppercase first character
 
// if the namespace prefix is there, remove it on our verification copy. If it isn't there, add it to the original realValue copy.
if (mw.config.values.get('wgNamespaceNumber') != 0) {
if (mw.config.values.wgCanonicalNamespace == verifyTitle.substr(0, mw.config.values.wgCanonicalNamespace.length).replace(/ /g, "_") && verifyTitle.charAt(mw.config.values.wgCanonicalNamespace.length) == ":") {
verifyTitle = verifyTitle.substr(mw.config.values.wgCanonicalNamespace.length + 1);
Linja 299:
verifyTitle = verifyTitle.replace(/^ +/, "").replace(/ +$/, ""); // trim left and right spaces
verifyTitle = verifyTitle.replace(/_/g, " "); // underscores to spaces
verifyTitle = verifyTitle.charAt([0)].toUpperCase() + verifyTitle.substring(1, verifyTitle.length); // uppercase first character
isPasteable = (verifyTitle == mw.config.values.wgTitle);