diff --git a/core/js/js.js b/core/js/js.js index 4b09cc4903..c12eb1d87e 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1305,82 +1305,6 @@ OC.Breadcrumb={ } }; -if(typeof localStorage !=='undefined' && localStorage !== null){ - /** - * User and instance aware localstorage - * @namespace - */ - OC.localStorage={ - namespace:'oc_'+OC.currentUser+'_'+OC.webroot+'_', - - /** - * Whether the storage contains items - * @param {string} name - * @return {boolean} - */ - hasItem:function(name){ - return OC.localStorage.getItem(name)!==null; - }, - - /** - * Add an item to the storage - * @param {string} name - * @param {string} item - */ - setItem:function(name,item){ - return localStorage.setItem(OC.localStorage.namespace+name,JSON.stringify(item)); - }, - - /** - * Removes an item from the storage - * @param {string} name - * @param {string} item - */ - removeItem:function(name,item){ - return localStorage.removeItem(OC.localStorage.namespace+name); - }, - - /** - * Get an item from the storage - * @param {string} name - * @return {null|string} - */ - getItem:function(name){ - var item = localStorage.getItem(OC.localStorage.namespace+name); - if(item === null) { - return null; - } else { - return JSON.parse(item); - } - } - }; -}else{ - //dummy localstorage - OC.localStorage={ - hasItem:function(){ - return false; - }, - setItem:function(){ - return false; - }, - getItem:function(){ - return null; - } - }; -} - -/** - * prototypical inheritance functions - * @todo Write documentation - * usage: - * MySubObject=object(MyObject) - */ -function object(o) { - function F() {} - F.prototype = o; - return new F(); -} - /** * Initializes core */