diff options
-rw-r--r-- | core/js/visitortimezone.js | 4 | ||||
-rw-r--r-- | core/templates/login.php | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/core/js/visitortimezone.js b/core/js/visitortimezone.js new file mode 100644 index 00000000000..58a1e9ea355 --- /dev/null +++ b/core/js/visitortimezone.js @@ -0,0 +1,4 @@ +$(document).ready(function () { + var visitortimezone = (-new Date().getTimezoneOffset() / 60); + $('#timezone-offset').val(visitortimezone); +});
\ No newline at end of file diff --git a/core/templates/login.php b/core/templates/login.php index 43e45997803..c82d2cafa2e 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -41,10 +41,5 @@ <input type="submit" id="submit" class="login primary" value="<?php echo $l->t('Log in'); ?>"/> </fieldset> </form> -<script> - $(document).ready(function () { - var visitortimezone = (-new Date().getTimezoneOffset() / 60); - $('#timezone-offset').val(visitortimezone); - }); +<?php OCP\Util::addscript('core', 'visitortimezone'); ?> -</script> |