diff options
author | Andrew Dolgov <[email protected]> | 2018-12-02 20:07:57 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-02 20:07:57 +0300 |
commit | d9c5c93cef313127b9b5010fbe279fdbddedadec (patch) | |
tree | 3a1838a1d9e9ff80bbbd57cd7b09b940f6ea4095 /js/tt-rss.js | |
parent | ad1b6f0a8618ed214001e90c0e5db380758a6c84 (diff) |
move some more stuff out of common.js
rework client-side cookie functions a bit
limit dojo cachebust based on server scripts modification time
remove param_escape()
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index 74b8403f8..4eeeed131 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -116,9 +116,9 @@ const App = { Feeds.reload(); Article.close(); - if (parseInt(getCookie("ttrss_fh_width")) > 0) { + if (parseInt(Cookie.get("ttrss_fh_width")) > 0) { dijit.byId("feeds-holder").domNode.setStyle( - {width: getCookie("ttrss_fh_width") + "px"}); + {width: Cookie.get("ttrss_fh_width") + "px"}); } dijit.byId("main").resize(); @@ -126,19 +126,19 @@ const App = { dojo.connect(dijit.byId('feeds-holder'), 'resize', function (args) { if (args && args.w >= 0) { - setCookie("ttrss_fh_width", args.w, getInitParam("cookie_lifetime")); + Cookie.set("ttrss_fh_width", args.w, getInitParam("cookie_lifetime")); } }); dojo.connect(dijit.byId('content-insert'), 'resize', function (args) { if (args && args.w >= 0 && args.h >= 0) { - setCookie("ttrss_ci_width", args.w, getInitParam("cookie_lifetime")); - setCookie("ttrss_ci_height", args.h, getInitParam("cookie_lifetime")); + Cookie.set("ttrss_ci_width", args.w, getInitParam("cookie_lifetime")); + Cookie.set("ttrss_ci_height", args.h, getInitParam("cookie_lifetime")); } }); - delCookie("ttrss_test"); + Cookie.delete("ttrss_test"); const toolbar = document.forms["main_toolbar_form"]; @@ -172,9 +172,9 @@ const App = { console.log("second stage ok"); }, genericSanityCheck: function() { - setCookie("ttrss_test", "TEST"); + Cookie.set("ttrss_test", "TEST"); - if (getCookie("ttrss_test") != "TEST") { + if (Cookie.get("ttrss_test") != "TEST") { return fatalError(2); } @@ -224,9 +224,9 @@ const App = { height: 'auto', borderTopWidth: '0px' }); - if (parseInt(getCookie("ttrss_ci_width")) > 0) { + if (parseInt(Cookie.get("ttrss_ci_width")) > 0) { dijit.byId("content-insert").domNode.setStyle( - {width: getCookie("ttrss_ci_width") + "px" }); + {width: Cookie.get("ttrss_ci_width") + "px" }); } $("headlines-frame").setStyle({ borderBottomWidth: '0px' }); @@ -240,9 +240,9 @@ const App = { height: '50%', borderTopWidth: '0px'}); - if (parseInt(getCookie("ttrss_ci_height")) > 0) { + if (parseInt(Cookie.get("ttrss_ci_height")) > 0) { dijit.byId("content-insert").domNode.setStyle( - {height: getCookie("ttrss_ci_height") + "px" }); + {height: Cookie.get("ttrss_ci_height") + "px" }); } $("headlines-frame").setStyle({ borderBottomWidth: '1px' }); @@ -466,8 +466,8 @@ const App = { App._widescreen_mode = !App._widescreen_mode; // reset stored sizes because geometry changed - setCookie("ttrss_ci_width", 0); - setCookie("ttrss_ci_height", 0); + Cookie.set("ttrss_ci_width", 0); + Cookie.set("ttrss_ci_height", 0); App.switchPanelMode(App._widescreen_mode); } else { @@ -557,8 +557,8 @@ const App = { App._widescreen_mode = !App._widescreen_mode; // reset stored sizes because geometry changed - setCookie("ttrss_ci_width", 0); - setCookie("ttrss_ci_height", 0); + Cookie.set("ttrss_ci_width", 0); + Cookie.set("ttrss_ci_height", 0); App.switchPanelMode(App._widescreen_mode); } else { |