Skip to content

Instantly share code, notes, and snippets.

View mysy00's full-sized avatar

Mikołaj Szczepański mysy00

View GitHub Profile
function getOffset( el ) {
var _y = 0;
while( el && !isNaN( el.offsetTop ) ) {
_y += el.offsetTop - el.scrollTop;
el = el.offsetParent;
}
return { top: _y };
}
if ( getOffset( document.querySelector('.section-5') ).top <= window.scrollY && (getOffset( document.querySelector('.section-5') ).top + document.querySelector('.section-5').clientHeight) >= window.scrollY) {
@mysy00
mysy00 / .gitconfig
Last active January 21, 2019 20:01
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
show-tree = log --oneline --graph --color --all --decorate
// ==UserScript==
// @name Shoutbox New Message Sound
// @version 0.1
// @description Play a sound when someone sends a message in the shoutbox
// @match http://mg-s.us/mybb/*
// @grant none
// ==/UserScript==
(function() {
'use strict';