Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64692e8

Browse files
add automatic copyright date and spaceholder deletion upon validation check
1 parent 15770ab commit 64692e8

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

‎static/index.js‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
// --------------------------------------
12
// Google Analytics
3+
// --------------------------------------
24
window.dataLayer = window.dataLayer || [];
35
function gtag(){dataLayer.push(arguments);}
46
gtag('js', new Date());
57

68
gtag('config', 'G-36KQSD0BWH');
79

8-
// Example starter JavaScript for disabling form submissions if there are invalid fields
10+
11+
// --------------------------------------
12+
// Disable form submissions if there are invalid fields
13+
// --------------------------------------
914
(function () {
1015
'use strict'
1116

@@ -23,9 +28,11 @@ gtag('config', 'G-36KQSD0BWH');
2328

2429
if (input.checkValidity() === false) {
2530
input.classList.add('is-invalid')
31+
input.nextElementSibling.nextElementSibling.classList.remove('spaceholder')
2632
}
2733
else {
2834
input.classList.add('is-valid')
35+
input.nextElementSibling.nextElementSibling.classList.remove('spaceholder')
2936
}
3037
}, false);
3138
});
@@ -47,4 +54,12 @@ gtag('config', 'G-36KQSD0BWH');
4754
}, false)
4855
})
4956

50-
})()
57+
})()
58+
59+
// --------------------------------------
60+
// Copyright Date
61+
// --------------------------------------
62+
var date = new Date();
63+
var year = date.getFullYear();
64+
65+
document.getElementById("date").innerHTML = year;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /