Skip to content

Instantly share code, notes, and snippets.

Paul Kinlan PaulKinlan

Block or report user

Report or block PaulKinlan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
PaulKinlan / unregister-service-worker.js
Last active Jun 1, 2016
unregister-service-worker bookmarklet
View unregister-service-worker.js
javascript: (function()%20%7B%20%0A%20%20%20%20console.log(%22test%22)%3B%0A%20%20%20%20var%20sw%20%3D%20navigator.serviceWorker%3B%0A%20%20%20%20if%20(sw.controller)%20%7B%0A%20%20%20%20%20%20sw.getRegistration(document.location).then(function(reg)%20%7B%20return%20reg.unregister()%3B%20%7D).then(function()%20%7B%20console.log(%22Unregister%20Successful%22)%20%7D).catch(function(e)%20%7B%20console.log(%22No%20Service%20Worker%3A%20%22%20%2B%20e)%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D())
PaulKinlan / builder.html
Last active May 19, 2019
Bookmark Builder
View builder.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
window.onload = function(e) {
var bookmark = document.getElementById("bookmark");
var code = document.getElementById("code");
View designer.html
<link rel="import"
<link rel="import"
<link rel="import"
<link rel="import"
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active Oct 25, 2019
CriticalCSS Bookmarklet and Devtool Snippet.js
View criticalcss-bookmarklet-devtool-snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles =;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
PaulKinlan / criticalcss.html
Last active Sep 30, 2019
Detect Critical CSS
View criticalcss.html
<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
<h2>Original CSS</h2>
<style style="display: block; white-space: pre; font-family: monospace">
h2 { margin:0; }
PaulKinlan /
Last active Dec 12, 2015
Launch the same page across multiple connected Android devices. ./
# Usage:
# Open browser on all connected devices -
# ./
# Open a url on all connected devices -
# ./
adb kill-server
PaulKinlan / gist:4160675
Created Nov 28, 2012
Encapsulating Request Animation Frame
View gist:4160675
Javascript is a funny thing.
Here are two things that will hit you with requestAnimationFrame
1) If you alias the window.requestAnimationFrame function on to anything other
than a window object, you get an Illegal Invocation Error.
You can solve this by using call() with the window object set.
PaulKinlan / dabblet.css
Created Jul 19, 2012
The first commented line is your dabblet’s title
View dabblet.css
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
View gist:2854138
var i = new Intent({
"action": "",
"type": "text/uri-list",
"data": ""
var onsuccess = function(data) {
var onerror = function(){ };
View gist:2853982
var i = new Intent({
"action": "",
"type": "image/*",
"extras": { "url": "" }
var onsuccess = function(data) {
var img1 = document.getElementById("img1");
if(data instanceof Blob) {
img1.src = URL.createObjectURL(data);
You can’t perform that action at this time.