home.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Copyright (c) 2016, 2024, 5 Mode
  3. *
  4. * This file is part of LightOff.
  5. *
  6. * LightOff is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * LightOff is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with LightOff. If not, see <https://www.gnu.org/licenses/>.
  18. *
  19. * home.js
  20. *
  21. * JS for the Index.
  22. *
  23. * @author Daniele Bonini <my25mb@aol.com>
  24. * @copyrights (c) 2016, 2024, 5 Mode
  25. * @license https://opensource.org/licenses/BSD-3-Clause
  26. */
  27. function LIGHTOFFsetFooterPos() {
  28. if (document.getElementById("footerCont")) {
  29. tollerance = 16;
  30. $("#LIGHTOFFfooterCont").css("top", parseInt( window.innerHeight - $("#LIGHTOFFfooterCont").height() - tollerance ) + "px");
  31. $("#LIGHTOFFfooter").css("top", parseInt( window.innerHeight - $("#LIGHTOFFfooter").height() - tollerance ) + "px");
  32. }
  33. }
  34. window.addEventListener("load", function() {
  35. setTimeout("LIGHTOFFsetFooterPos()", 1000);
  36. }, true);
  37. window.addEventListener("resize", function() {
  38. setTimeout("LIGHTOFFsetFooterPos()", 1000);
  39. }, true);