From bd66a9ef28ddf25e014e852e5ee770868f619aaa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 8 Dec 2018 09:32:14 +0300 Subject: render article on the client using headlines data --- js/ArticleCache.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 js/ArticleCache.js (limited to 'js/ArticleCache.js') diff --git a/js/ArticleCache.js b/js/ArticleCache.js deleted file mode 100644 index ce34d00d9..000000000 --- a/js/ArticleCache.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' -/* global __, ngettext */ -define(["dojo/_base/declare"], function (declare) { - ArticleCache = { - has_storage: 'sessionStorage' in window && window['sessionStorage'] !== null, - set: function (id, obj) { - if (this.has_storage) - try { - sessionStorage["article:" + id] = obj; - } catch (e) { - sessionStorage.clear(); - } - }, - get: function (id) { - if (this.has_storage) - return sessionStorage["article:" + id]; - }, - clear: function () { - if (this.has_storage) - sessionStorage.clear(); - }, - del: function (id) { - if (this.has_storage) - sessionStorage.removeItem("article:" + id); - }, - } - - return ArticleCache; -}); -- cgit v1.2.3