Skip to content

Instantly share code, notes, and snippets.

View jaggli's full-sized avatar

Matthias Jäggli jaggli

View GitHub Profile
@jaggli
jaggli / _Readme.md
Last active February 25, 2022 12:34
SIA address spider
@jaggli
jaggli / 1_HotjarFix.js
Last active July 9, 2018 13:52
Styled Components vs Hotjar (Sent to Hotjar support at 27. March 2018)
import React from 'react'
const fixHotjar = () => {
// add sync style tag to head
const syncStyles = document.createElement('style')
syncStyles.type = 'text/css'
document.head.insertBefore(syncStyles, document.head.children[0])
// start styles sync
let lastStyles
@jaggli
jaggli / ads-init.js
Created January 24, 2017 07:55
DAC config + base tag @ Scout24 Schweiz AG
//methods
var
dacSuccess = function dacSuccess(){
// set debug mode
ADTECH.debugMode = $.asyncScripts.defaults.debug;
$.loadDac.loaded = true;
$(document).trigger("dac-loaded");
},
@jaggli
jaggli / viewport.js
Last active June 30, 2016 10:19
Measure viewport with JavaScirpt
/*!
Reading the user agent viewport
Author: https://github.com/jaggli
License: https://www.tldrlegal.com/l/wtfpl
*/
var getViewport = function getViewport(noCache){
var
guid = "_viewport-612ed011-5444-4166-8026-e00d76e426a3",
viewport = window[guid];