Skip to content

Instantly share code, notes, and snippets.

@falvhb
falvhb / glitch.js
Created June 23, 2017 12:10
Glitch Live Reload
function start(){
$('.CodeMirror')[0].CodeMirror.options.extraKeys['Ctrl-S'] = function(){$.get('https://edison.glitch.me/reload')};
}
function check(){
if ($ && $('.CodeMirror') && $('.CodeMirror')[0] && $('.CodeMirror')[0].CodeMirror){
console.log('starting...');
start();
} else {
console.log('waiting...');
/**
* SHARE- Additional amp-social-share styles
*/
amp-social-share[type="whatsapp"]{
display: inline-block;
width: 45px;
height: 33px;
background-color: #25d366;
@falvhb
falvhb / jsonformatter.js
Created January 11, 2017 10:28
Format pre JSON in page
//Nice formatting of all JSON objects
var divs = document.querySelectorAll('pre.json');
[].forEach.call(divs, function(elm) {
// do whatever
eval('var json = ' + elm.innerHTML);
elm.innerHTML = JSON.stringify(json, undefined, 2);
});
//Allow to easily add CSS rules
var sheet = (function() {
@falvhb
falvhb / index.html
Last active September 2, 2016 09:52
nutzungshinweise/blocker
.vhb-blocker-page {
font-family: "Gotham Narrow SSm A", "Gotham Narrow SSm B", Arial, Helvetica, sans-serif;
}
.vhb-blocker-background{
background-repeat: no-repeat;
background-position: top center;
}
@falvhb
falvhb / readme.md
Created August 23, 2016 06:41
Concept for categorization of sentences in JS