Skip to content

Instantly share code, notes, and snippets.

View EliseWei's full-sized avatar

Elise Wei EliseWei

View GitHub Profile
@EliseWei
EliseWei / NXS-ible
Created February 12, 2018 08:11
Nuke the images, contrast, and mouse events on a page.
const doNothing = (event) => { event.preventDefault(); event.stopPropagation(); return false; };
window.onmousewheel = doNothing;
let ss = document.createElement('style');
ss.innerHTML = "body {-webkit-filter: blur(1px) contrast(.8) grayscale(1); pointer-events: none;}";
ss.innerHTML += "* {background-image: none !important}";
ss.innerHTML += "img, svg {opacity: 0 !important;}";
ss.innerHTML += "::-webkit-scrollbar {display: none}";
ss.innerHTML += ":focus {border: dotted 2px blue !important; outline: dotted 2px blue !important;}";
let head = document.getElementsByTagName('head')[0];
@EliseWei
EliseWei / html1.html
Last active January 26, 2016 18:17
Files for A Brief Demonstrated History of HTML & CSS
<!doctype html>
<head><title></title></head>
<body>
<h1>My Scientific Paper</h1>
<h3>by Elise Wei - 01/26/2016</h3>
<h2>Abstract</h2>
<p>The purpose of this study was to find some very valuable science and share it with the world. You will find my results below, and I think you will find them very interesting. [<a href="#foot1">footnote 1</a>]</p>
<h2>Results</h2>
@EliseWei
EliseWei / PTW15.js
Last active November 19, 2015 22:07
Script snippets used for Dev Day talk on 4/23/15 (updated 11/19/15)
// Placekittens http://www.houzz.com/photos/products
// Example 1
var target = document.getElementsByClassName('shop-landing-top-promotions')[0];
target.innerHTML = '<img src="http://placekitten.com/g/800/120" alt="" />';
// Example 2
var target = document.getElementsByClassName('shop-landing-top-promotions')[0];
var targetInner = target.getElementsByClassName('shop-landing-top-promotions-content')[0];
targetInner.style.visibility='hidden';
target.style.background = 'url("http://placekitten.com/g/800/120") 0 0 repeat';
@EliseWei
EliseWei / poetry
Created March 31, 2015 15:35
Magnetic Poetry js plugin
// Triggered by an image map area with href="#magnetic"
(function() {
// Starting magnet z-index.
var z = 1000;
var d = document;
var b = d.getElementsByTagName('body')[0];
var triggerGrandparents = [];
function initPanel() {