Anonymous user
User:Tyrok1/monobook.js: Difference between revisions
Testing new version of language example link script
(Obvious typo) |
(Testing new version of language example link script) |
||
Line 5:
Fe 4.0.280.
========================================*/
function SectionLinkLoadFromStorage()
{
{
window.languageLinks = JSON.parse(localStorage.languageLinks);
}
}
function SectionLinkSaveToStorage()
{
if((typeof localStorage != "undefined") && (typeof window.languageLinks != "undefined"))
{
localStorage.languageLinks = JSON.stringify(window.languageLinks);
}
}
function SectionLinkCreateLoadClosure(request)
Line 13 ⟶ 29:
//done loading
//initialize the "languages with link information" array
if(typeof
{▼
▲ if(typeof localStorage.languageLinks == "undefined")
{
}
Line 70 ⟶ 82:
//add the language to our array for later use
}
//save the link data to localStorage, if available
SectionLinkSaveToStorage();
//and if we've got a function to call when we're done, call it
Line 116 ⟶ 131:
return;
}
//load stored data to reduce requests
SectionLinkLoadFromStorage();
//check this page's "firstHeading" ID content for a category name
Line 127 ⟶ 145:
//check to see if we already have link information about the current language
if(
{
//we do
Line 135 ⟶ 153:
if(aEls[i].href.indexOf("#") < 0)
{
aEls[i].href += "#" + encodeURIComponent(
}
}
|