Skip to content

Instantly share code, notes, and snippets.

View oopix-jane's full-sized avatar

Ong Jie Ying Jane oopix-jane

View GitHub Profile
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active October 12, 2024 16:34
CriticalCSS Bookmarklet and 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 = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@thetrickster
thetrickster / gist:5493542
Last active November 10, 2017 04:52
Enable/Disable form fields based on Facebook Like Button events. Press Like and form fields are disabled
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK