Download this file
| 1 | // zone.js: the browser's own time zone into "Start a call"'s hidden zone |
| 2 | // field, so the call's automatic title is in the starter's time rather |
| 3 | // than the server's (handlers_meetings.go, callZone). Nothing else reads |
| 4 | // it; without script the field stays empty and the title names its zone. |
| 5 | (function () { |
| 6 | var zone = ''; |
| 7 | try { zone = Intl.DateTimeFormat().resolvedOptions().timeZone || ''; } catch (e) { zone = ''; } |
| 8 | function fill() { |
| 9 | var fields = document.querySelectorAll('input[data-calls-zone]'); |
| 10 | for (var i = 0; i < fields.length; i++) fields[i].value = zone; |
| 11 | } |
| 12 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', fill); |
| 13 | else fill(); |
| 14 | })(); |
| 15 | |