-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjavascript.js
63 lines (54 loc) · 1.75 KB
/
javascript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the Revised BSD License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Revised BSD License for more details.
Copyright 2004-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: javascript.js - Last Update: 6/16/2023 SVN 973 - Author: cooldude2k $
*/
function getid(id) {
var itm;
itm = document.getElementById(id);
return itm; }
function toggletag(id) {
var itm;
itm = document.getElementById(id);
if (itm.style.display == "none") {
itm.style.display = ""; }
else {
itm.style.display = "none"; } }
function bgchange(id,color) {
var itm;
itm = document.getElementById(id);
itm.style.backgroundColor = ''+color+''; }
function innerchange(tag,text1,text2) {
var usrname;
usrname = document.getElementsByTagName(tag);
for (var i = 0; i < usrname.length; i++) {
if(usrname[i].innerHTML==text1) {
usrname[i].innerHTML = text2; } } }
function addsmiley(id,code) {
var itm;
itm = document.getElementById(id);
var pretext = itm.value;
itm.value = pretext + code; }
function GetUserTimeZone() {
if (!Intl || !Intl.DateTimeFormat().resolvedOptions().timeZone) {
throw 'Time zones are not available in this environment';
}
try {
tzname = Intl.DateTimeFormat().resolvedOptions().timeZone;
}
catch (ex) {
tzname = false;
return false;
}
if(tzname!=false)
{
document.getElementById("YourOffSet").value = tzname;
return true;
}
}