mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update api components
This commit is contained in:
parent
616dab3479
commit
8bd28441e1
44 changed files with 21 additions and 24 deletions
|
@ -1 +1 @@
|
|||
define([],function(){"use strict";function updateCache(){cache.put("data",new Response(JSON.stringify(localData)))}var cache,localData,myStore={};return myStore.setItem=function(name,value){if(localData){var changed=localData[name]!==value;changed&&(localData[name]=value,updateCache())}},myStore.getItem=function(name){if(localData)return localData[name]},myStore.removeItem=function(name){localData&&(localData[name]=null,delete localData[name],updateCache())},myStore.init=function(){return caches.open("embydata").then(function(result){cache=result,localData={}})},myStore});
|
||||
define([],function(){"use strict";function MyStore(){}function updateCache(instance){instance.cache.put("data",new Response(JSON.stringify(instance.localData)))}return MyStore.prototype.init=function(){var instance=this;return caches.open("embydata").then(function(result){instance.cache=result,instance.localData={}})},MyStore.prototype.setItem=function(name,value){if(this.localData){var changed=this.localData[name]!==value;changed&&(this.localData[name]=value,updateCache(this))}},MyStore.prototype.getItem=function(name){if(this.localData)return this.localData[name]},MyStore.prototype.removeItem=function(name){this.localData&&(this.localData[name]=null,delete this.localData[name],updateCache(this))},new MyStore});
|
Loading…
Add table
Add a link
Reference in a new issue