<script type=\"text/javascript\" src=\"pngfix.js\"></script>
<link rel=\"stylesheet\" type=\"text/css\" href=\"tt-rss-ie.css\">
<![endif]-->
- </head><body onload=\"init()\">";
+ </head><body>
+ <script type=\"text/javascript\">
+ if (document.addEventListener) {
+ document.addEventListener(\"DOMContentLoaded\", init, null);
+ }
+ window.onload = init;
+ </script>";
print "<ul class=\"feedList\" id=\"feedList\">";
print "</ul>";
+ print '
+ <script type="text/javascript">
+ /* for IE */
+ function statechange() {
+ if (document.readyState == "interactive") init();
+ }
+
+ if (document.readyState) {
+ if (document.readyState == "interactive" || document.readyState == "complete") {
+ init();
+ } else {
+ document.onreadystatechange = statechange;
+ }
+ }
+ </script></body></html>';
}
<script type=\"text/javascript\" src=\"pngfix.js\"></script>
<link rel=\"stylesheet\" type=\"text/css\" href=\"tt-rss-ie.css\">
<![endif]-->
- </head><body onload='init()'>";
+ </head><body>
+ <script type=\"text/javascript\">
+ if (document.addEventListener) {
+ document.addEventListener(\"DOMContentLoaded\", init, null);
+ }
+ window.onload = init;
+ </script>";
}
if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
update_all_counters('$feed');
</script>";
+ print '
+ <script type="text/javascript">
+ /* for IE */
+ function statechange() {
+ if (document.readyState == "interactive") init();
+ }
+
+ if (document.readyState) {
+ if (document.readyState == "interactive" || document.readyState == "complete") {
+ init();
+ } else {
+ document.onreadystatechange = statechange;
+ }
+ }
+ </script>';
+
if ($addheader) {
print "</body></html>";
}
function init() {
try {
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
hideOrShowFeeds(document, getCookie("ttrss_vf_hreadf") == 1);
document.onkeydown = hotkey_handler;
parent.setTimeout("timeout()", 0);
try {
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
+
// IE kludge
if (!xmlhttp) {
document.getElementById("prefContent").innerHTML =
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
-<body onload="init()">
+<body>
+
+<script type="text/javascript">
+if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", init, null);
+}
+window.onload = init;
+</script>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
<? db_close($link); ?>
+<script type="text/javascript">
+ /* for IE */
+ function statechange() {
+ if (document.readyState == "interactive") init();
+ }
+
+ if (document.readyState) {
+ if (document.readyState == "interactive" || document.readyState == "complete") {
+ init();
+ } else {
+ document.onreadystatechange = statechange;
+ }
+ }
+</script>
+
</body>
</html>
function localHotkeyHandler(keycode) {
-/* if (keycode == 78) {
- return moveToPost('next');
- }
-
- if (keycode == 80) {
- return moveToPost('prev');
- } */
-
if (keycode == 82) { // r
return scheduleFeedUpdate(true);
}
try {
+ // this whole shebang is based on http://www.birnamdesigns.com/misc/busted2.html
+
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
+
disableContainerChildren("headlinesToolbar", true);
if (!genericSanityCheck())
<? } ?>
- <script type="text/javascript" src="functions.js"></script>
<script type="text/javascript" src="tt-rss.js"></script>
+ <script type="text/javascript" src="functions.js"></script>
<!--[if gte IE 5.5000]>
<script type="text/javascript" src="pngfix.js"></script>
<link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
-<body onload="init()">
+<body>
+
+<script type="text/javascript">
+if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", init, null);
+}
+window.onload = init;
+</script>
<? if (ENABLE_UPDATE_DAEMON && !file_is_locked("update_daemon.lock")) { ?>
<div class="warning">
<? db_close($link); ?>
+<script type="text/javascript">
+ /* for IE */
+ function statechange() {
+ if (document.readyState == "interactive") init();
+ }
+
+ if (document.readyState) {
+ if (document.readyState == "interactive" || document.readyState == "complete") {
+ init();
+ } else {
+ document.onreadystatechange = statechange;
+ }
+ }
+</script>
+
</body>
</html>
function init() {
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
document.onkeydown = hotkey_handler;
}