diff options
author | Andrew Dolgov <[email protected]> | 2005-09-08 06:36:28 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-09-08 06:36:28 +0100 |
commit | 22a93ad8b2aa86be9330c4002715e17c8bcea608 (patch) | |
tree | 34fcde34f73d7c788e52dcd0266b3e7d799d7d41 /tt-rss.js | |
parent | 867413478a0f18754c87a9998277e6d6d58abe08 (diff) |
more cookie magic, basic sanity checks on init()
Diffstat (limited to 'tt-rss.js')
-rw-r--r-- | tt-rss.js | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -274,17 +274,35 @@ function localHotkeyHandler(keycode) { } -function init() { - - disableContainerChildren("headlinesToolbar", true); +function genericSanityCheck() { if (!xmlhttp) { document.getElementById("headlines").innerHTML = "<b>Fatal error:</b> This program requires XmlHttpRequest " + "to function properly. Your browser doesn't seem to support it."; - return; + return false; + } + + setCookie("ttrss_vf_test", "TEST"); + if (getCookie("ttrss_vf_test") != "TEST") { + + document.getElementById("headlines").innerHTML = + "<b>Fatal error:</b> This program requires cookies " + + "to function properly. Your browser doesn't seem to support them."; + + return false; } + return true; +} + +function init() { + + disableContainerChildren("headlinesToolbar", true); + + if (!genericSanityCheck()) + return; + updateFeedList(false, false); document.onkeydown = hotkey_handler; |