kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Cope with localStorage not being available
IE10 doesn't allow localStorage for HTML pages loaded from the file:// protocol. Boo.print-window-tiddler
rodzic
d42fb673f8
commit
05e73ee1da
|
@ -117,14 +117,16 @@ exports.getBoundingPageRect = function(element) {
|
|||
Saves a named password in the browser
|
||||
*/
|
||||
exports.savePassword = function(name,password) {
|
||||
if(window.localStorage) {
|
||||
localStorage.setItem("tw5-password-" + name,password);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Retrieve a named password from the browser
|
||||
*/
|
||||
exports.getPassword = function(name) {
|
||||
return localStorage.getItem("tw5-password-" + name);
|
||||
return window.localStorage ? localStorage.getItem("tw5-password-" + name) : "";
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Ładowanie…
Reference in New Issue