Skip to content

Instantly share code, notes, and snippets.

View schonert's full-sized avatar
🪖
btw i use vim

Stefan Schonert schonert

🪖
btw i use vim
View GitHub Profile

Keybase proof

I hereby claim:

  • I am schonert on github.
  • I am sschonert (https://keybase.io/sschonert) on keybase.
  • I have a public key ASCR-yLBZDYotuEfXGKVj3CBQzoGYmaEB3Z46Ng68IpcdAo

To claim this, I am signing this object:

@schonert
schonert / getSearch
Last active August 29, 2015 14:05
Update location search parameter
/**
* Get search parameters as an object.
* Pasing a key will return the givin value
*/
var getSearch = function(key) {
var search = location.search.trim().slice(1).split('&'),
params = {};
// Split search into an paras obj
@schonert
schonert / gist:7310408
Created November 4, 2013 22:35
Determines rather the user is scrolling or not. Useful for breaking out of scrolling animations
var userScroll = false;
function mouseEvent(e) {
// Programic scroll has no event
if( typeof e === 'object')
userScroll = true;
else
userScroll = false;
}