Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am splosch on github.
  • I am sploscho (https://keybase.io/sploscho) on keybase.
  • I have a public key ASADUU5Gv0WUK8OiMU2JIQ6AkkL0KWzvq72WBcjiy4-JLAo

To claim this, I am signing this object:

// allow Object.values(myObject) for IE
// alternative in a npm controlled environment: https://www.npmjs.com/package/object.values
Object.values = Object.values ? Object.values : function(obj) {
var allowedTypes = ["[object String]", "[object Object]", "[object Array]", "[object Function]"];
var objType = Object.prototype.toString.call(obj);
if(obj === null || typeof obj === "undefined") {
throw new TypeError("Cannot convert undefined or null to object");
} else if(!~allowedTypes.indexOf(objType)) {
return [];
@splosch
splosch / isSPContentPage.js
Last active January 9, 2019 14:56
Adds class "isSPContentPage" to body of webpages that are Sharepoint Content Pages - not so to Settings etc.
(function(){
var onDOMReady = function( fn ) {
if ( document.readyState !== 'loading' ) {
fn();
} else {
document.addEventListener( "DOMContentLoaded", fn );
}
},
markSPContentPages = function(){
var whitelist = [
@splosch
splosch / bookmarklet.url
Created March 9, 2018 19:37 — forked from sv-in/bookmarklet.url
JS: Bookmarklet for displaying QR code of current URL (good for presentations)
javascript:void !function(e,t,n,r,i,s){while(n--&&(i=t[n])>e);s=r.style,s.position="fixed",s.zIndex=-1>>>1,s.top=s.left="50%",s.marginTop=s.marginLeft=i/-2+"px",r.src="http://chart.apis.google.com/chart?cht=qr&chld=H|0&chs="+i+"x"+i+"&chl="+escape(location)}(Math.min(top.innerHeight,top.innerWidth),[100,150,200,250,300,350,400,500],8,document.body.appendChild(new Image))
@splosch
splosch / flip-the-coin-coding-challenge.markdown
Last active June 22, 2017 07:59
Flip the Coin - Coding Challenge
@splosch
splosch / SassMeister-input-HTML.html
Created November 16, 2015 16:19
Generated by SassMeister.com.
<button class="cct_runtime_3 btn">3</button>
<button class="cct_runtime_3 btn active">3</button>
<button class="cct_runtime_6 btn">6</button>
<button class="cct_runtime_6 btn active">6</button>
<button class="cct_runtime_12 btn">12</button>
<button class="cct_runtime_12 btn active">12</button>
<button class="cct_runtime_18 btn">18</button>
<button class="cct_runtime_18 btn active">18</button>
<button class="cct_runtime_24 btn">24</button>
<button class="cct_runtime_24 btn active">24</button>
@splosch
splosch / md5_device_fingerprint.js
Last active March 6, 2018 20:50
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
@splosch
splosch / kinetic_layers_demo.html
Last active August 29, 2015 14:15
Canvas basic layers demo powerded by kinetic.js
<h1>Canvas basic layers demo</h1>
<p>powerded by kinetic.js</p>
<a href="http://jsfiddle.net/splosch/sezph315/1/">Working Demo (JSFiddle)</a>
<script src="https://cdnjs.cloudflare.com/ajax/libs/kineticjs/5.2.0/kinetic.min.js"></script>
<div id="container"></div>
@splosch
splosch / Cross-Browser-Image-Blur-With-Transition.markdown
Created February 10, 2015 20:15
Cross-Browser Image Blur With Transition
@splosch
splosch / SASS---SCSS:-colorloop.markdown
Created February 10, 2015 20:14
SASS / SCSS: colorloop

SASS / SCSS: colorloop

given a list of hex-colors this SASS code allows to color siblings while iterating through this color list

A Pen by Mario Winkler on CodePen.

License.