KittyCatS! Community Forum

Full Version: Minor bug fixes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is Javascript. These changes really should be applied to the styles.

Code:
switch (window.location.pathname) {
    default:
        return;
    case "/pedigree/":
    case "/pedigree/index.php":
    case "/pedigree/pedigree2.php":
    case "/pedigree/pedigreeview.php":
    case "/online/":
    case "/online/index.php":
    case "/online/get_cat.php":
        // BUGFIX -- The footer is 43px or 44px not 40px.
        // This causes vertical scrolling to always appear, even when
        // not needed.  The fix is to remove the height style and let
        // the browser figure it out.
        var tables = document.getElementsByTagName("TABLE");
        tables[tables.length - 1].parentNode.style.removeProperty("height");
        // BUGFIX -- The footer is not as wide as the scrollable area.
        document.body.style.display = "inline-block";
        // BUGFIX -- Some pages don't work well if less than full-screen width.
        // This also fixes the problem where the background chops off when
        // horizontally scrolling.
        document.body.style.minWidth = "100%";
        // BUGFIX -- There is invisble text outside the <body>.  The fix
        // for the footer width, just above, caused that text to display
        // which brought back unnecessary scrolling.  Setting the font
        // size to 0 puts a stop to that.  This is safe because the page
        // overrides the user's preferences and sets the font size later
        // inside the <body>.
        document.documentElement.style.fontSize = "0";
        break;
}
Reference URL's