aboutsummaryrefslogtreecommitdiffstats
path: root/nicetitle
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-02-16 22:23:02 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-02-16 22:23:02 +0000
commitfca084e008c7a78a0f2724f84b64c4da4c9be330 (patch)
tree364c09d02383bf453a1cd3a2658f9b39ce5b6e03 /nicetitle
parentcb98d0f92dfd9b4e0bcef53d3160c6b7c548e0f4 (diff)
downloadphpicalendar-fca084e008c7a78a0f2724f84b64c4da4c9be330.zip
phpicalendar-fca084e008c7a78a0f2724f84b64c4da4c9be330.tar.gz
phpicalendar-fca084e008c7a78a0f2724f84b64c4da4c9be330.tar.bz2
Fix nicetitle positioning code
Diffstat (limited to 'nicetitle')
-rw-r--r--nicetitle/nicetitle.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/nicetitle/nicetitle.js b/nicetitle/nicetitle.js
index 578ab3a..76a0ab0 100644
--- a/nicetitle/nicetitle.js
+++ b/nicetitle/nicetitle.js
@@ -294,12 +294,13 @@ function getScrollPosition() {
var x = 0;
var y = 0;
- if (window.scrollX && window.scrollY) {
+ if ((typeof(window.scrollX) != "undefined") &&
+ (typeof(window.scrollY) != "undefined")) {
x = window.scrollX;
y = window.scrollY;
}
- else if (document.documentElement.scrollLeft &&
- document.documentElement.scrollTop) {
+ else if ((typeof(document.documentElement.scrollLeft) != "undefined") &&
+ (typeof(document.documentElement.scrollTop) != "undefined")) {
x = document.documentElement.scrollLeft;
y = document.documentElement.scrollTop;
}
@@ -311,12 +312,13 @@ function getWindowSize() {
var x = 0;
var y = 0;
- if (window.innerWidth && window.innerHeight) {
+ if ((typeof(window.innerWidth) != "undefined") &&
+ (typeof(window.innerHeight) != "undefined")) {
x = window.innerWidth;
y = window.innerHeight;
}
- else if (document.documentElement.clientWidth &&
- document.documentElement.clientHeight) {
+ else if ((typeof(document.documentElement.clientWidth) != "undefined") &&
+ (typeof(document.documentElement.clientHeight) != "undefined")) {
x = document.documentElement.clientWidth;
y = document.documentElement.clientHeight;
}

© 2014-2020 Faster IT GmbH | imprint | privacy policy