summaryrefslogtreecommitdiff
path: root/js/functions.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/functions.js')
-rw-r--r--js/functions.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/functions.js b/js/functions.js
index f628142..2ea12d6 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -120,3 +120,23 @@ function str_pad (input, pad_length, pad_string, pad_type) {
return input;
}
+
+function updateOrientation() {
+ switch(window.orientation) {
+ case 0:
+ orient = "portrait";
+ break;
+ case -90:
+ orient = "landscape";
+ break;
+ case 90:
+ orient = "landscape";
+ break;
+ case 180:
+ orient = "portrait";
+ break;
+ }
+ document.body.setAttribute("orient", orient);
+ window.scrollTo(0, 1);
+
+} \ No newline at end of file