User:Tyrok1/monobook.js: Difference between revisions
Content added Content deleted
m (Testing disabling HTML5 storage) |
m (Another experiment) |
||
Line 8: | Line 8: | ||
function SectionLinkLoadFromStorage() |
function SectionLinkLoadFromStorage() |
||
{ |
{ |
||
if((typeof localStorage != "undefined") && (typeof localStorage.languageLinks != "undefined")) |
|||
{ |
{ |
||
window.languageLinks = JSON.parse(localStorage.languageLinks); |
window.languageLinks = JSON.parse(localStorage.getItem("languageLinks")) || (new Object()); |
||
} |
} |
||
} |
} |
||
function SectionLinkSaveToStorage() |
function SectionLinkSaveToStorage() |
||
{ |
{ |
||
if((typeof localStorage != "undefined") && (typeof window.languageLinks != "undefined")) |
|||
{ |
{ |
||
localStorage.languageLinks |
localStorage.setItem("languageLinks", JSON.stringify(window.languageLinks)); |
||
} |
} |
||
} |
} |
||