mirror of
https://github.com/offen/website.git
synced 2024-12-24 22:00:23 +01:00
11 lines
292 B
JavaScript
11 lines
292 B
JavaScript
;(function () {
|
|
var icon = document.querySelector('body.index .icon')
|
|
if (!icon) {
|
|
return
|
|
}
|
|
window.addEventListener('scroll', function () {
|
|
var scrollTop = parseInt(window.document.documentElement.scrollTop, 10)
|
|
icon.style.opacity = Math.min(scrollTop / 100, 1)
|
|
})
|
|
})()
|