]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove obsolete methods to call init(); code cleanup
authorAndrew Dolgov <fox@bah.org.ru>
Thu, 24 Dec 2009 09:20:01 +0000 (12:20 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Thu, 24 Dec 2009 09:20:01 +0000 (12:20 +0300)
opera.css [deleted file]
prefs.js
prefs.php
tt-rss.js
tt-rss.php

diff --git a/opera.css b/opera.css
deleted file mode 100644 (file)
index 27e748d..0000000
--- a/opera.css
+++ /dev/null
@@ -1,27 +0,0 @@
-table.main td.headlines {
-       height : 35%;
-       border-width : 0px 0px 1px 1px;
-       border-style : solid;
-       border-color : #c0c0c0;
-}
-
-/* #infoBoxShadow {
-       background-image : url("images/overlay.png");
-       left : 0;
-       top : 0;
-       height : 100%;
-       width : 100%;
-       z-index : 3;
-       position : absolute;
-       display : none;
-}
-
-#infoBox {     
-       font-size : small;
-       position : relative;
-       top : 30%;
-       left : 30%;
-       width : 30%;
-       padding-bottom : 5px;   
-} */
-
index 820c31eacccb56002873155d490f6cb4c4a20851..8c0d2fbe19c9d7478fa554d3e4637b506fe34f47 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1217,9 +1217,6 @@ function init() {
 
        try {
        
-               if (arguments.callee.done) return;
-               arguments.callee.done = true;           
-
                if (getURLParam('debug')) {
                        Element.show("debug_output");
                        debug('debug mode activated');
index 91f813b85818c187a3f6c9cacbb9982a651f3824..d8118c4c1805a8a70eea5ad70f38b872d75bb310 100644 (file)
--- a/prefs.php
+++ b/prefs.php
        <script type="text/javascript" charset="utf-8" src="prefs.js?<?php echo $dt_add ?>"></script>
 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
+               
        <script type="text/javascript">
-       //<![CDATA[
-               if (navigator.userAgent.match("Opera")) {
-                       document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
-               }
-       //]]>
+               Event.observe(window, 'load', function() {
+                       init();
+               });
        </script>
+
 </head>
 
 <body id="ttrssPrefs">
 
 <img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/>
 
-<script type="text/javascript">
-if (document.addEventListener) {
-       document.addEventListener("DOMContentLoaded", init, null);
-}
-window.onload = init;
-</script>
-
 <ul id="debug_output" style='display : none'><li>&nbsp;</li></ul>
 
 <div id="prefHeader">
@@ -108,10 +100,6 @@ window.onload = init;
 </div>
 
 <div id="prefTabs">
-               <!-- <div class="return">
-                       <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a>
-               </div> -->
-
                <div class='prefKbdHelp'>
                        <img src="images/small_question.png" alt="?"/> <a href='#' onclick="Effect.Appear('hotkey_help_overlay', {duration: 0.3})"><?php echo __("Keyboard shortcuts") ?></a>
                </div>
@@ -179,20 +167,5 @@ window.onload = init;
 
 <?php 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>
index 408eb3913ed91a55e6c736b0bf41ed3ec98ab6e3..af5c6fae0cc7c4bb7e303d0dd47f8aacac4e7b91 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -385,11 +385,6 @@ function init() {
 
        try {
 
-               // this whole shebang is based on http://www.birnamdesigns.com/misc/busted2.html
-
-               if (arguments.callee.done) return;
-               arguments.callee.done = true;           
-
                init_gears();
 
                disableContainerChildren("headlinesToolbar", true);
@@ -512,6 +507,7 @@ function init_second_stage() {
                delCookie("ttrss_vf_test");
 
 //             document.onresize = resize_headlines;
+               window.onresize=resize_headlines;
 
                var toolbar = document.forms["main_toolbar_form"];
 
index 9caa666dddb8a3df8833334da71a1acdde0a62f7..fd3c88d4e9d7585b80926ddc0aa2b026b5211ae0 100644 (file)
        <script type="text/javascript" charset="utf-8" src="offline.js?<?php echo $dt_add ?>"></script>
 
        <script type="text/javascript" src="gears_init.js"></script>
-
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 
        <script type="text/javascript">
-       //<![CDATA[
-               if (navigator.userAgent.match("Opera")) {
-                       document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
-               }
-               window.onresize=resize_headlines;
-       //]]>
+               Event.observe(window, 'load', function() {
+                       init();
+               });
        </script>
 </head>
 
 
 <div id="dialog_overlay" style="display : none"> </div>
 
-<script type="text/javascript">
-if (document.addEventListener) {
-       document.addEventListener("DOMContentLoaded", init, null);
-}
-window.onload = init;
-</script>
-
 <ul id="debug_output" style='display : none'><li>&nbsp;</li></ul>
 
 <div id="infoBoxShadow" style="display : none"><div id="infoBox">&nbsp;</div></div>
@@ -285,12 +274,6 @@ window.onload = init;
 
                </form>
 
-               <!-- &nbsp;<input class="button" type="submit"
-                       onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
-
-               <!-- <input class="button" type="submit"
-                       onclick="catchupCurrentFeed()" value="Mark as read">  -->
-
        </div>
 
 <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
@@ -331,20 +314,5 @@ window.onload = init;
 
 <?php 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>