User:Interiot/js/RealTitle.js: Difference between revisions

Content deleted Content added
No edit summary
merge from version posted to MediaWiki:Common.js
Line 1:
//============================================================
// The function looks for a banner like that:
// "Technical restrictions" title fix
// <div id="RealTitleBanner">Div that is hidden
//============================================================
//******** written by User:Interiot ********
// For pages that have something like Template:Lowercase, replace the title, but only if it is cut-and-pasteable as a valid wikilink.
// (for instance [[JiPod]]'s title is updated. But [[C#]] is not aan usefulequivalent wikilink, so on [[JC Sharp]], thedoesn't <h1>have titleits ismain nottitle changed)
//
// The function looks for a banner like thatthis:
// <div id="RealTitleBanner">Div <!-- div that isgets hidden -->
// <span id="RealTitle">title</span>
// </div>
// An element with id=DisableRealTitle disables the function.
//
// The <h1> is changed ONLY IF the proposed title is a copy-n-pasteable version of the underlying title.
// (for instance [[J#]] is not a useful wikilink, so on [[J Sharp]], the <h1> title is not changed)
addOnloadHook(function() {
try {
Line 72 ⟶ 76:
return str;
}
// ^^^^ end "technical restrictions" title fix ^^^^
//============================================================