more cookie magic, basic sanity checks on init()
This commit is contained in:
parent
867413478a
commit
22a93ad8b2
1 changed files with 22 additions and 4 deletions
26
tt-rss.js
26
tt-rss.js
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue