Skip to content

Instantly share code, notes, and snippets.

View dmd's full-sized avatar

Daniel M. Drucker, Ph.D. dmd

View GitHub Profile
@dmd
dmd / 0_reuse_code.js
Created August 9, 2016 21:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// ==UserScript==
// @name data2dick
// @include *
// ==/UserScript==
(function() {
var textnodes = document.evaluate("//body//text()[not(ancestor::script) and not(ancestor::style)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),
node, text;
for(var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);