Skip to content

Instantly share code, notes, and snippets.

@neocris
Last active December 28, 2019 12:30
Show Gist options
  • Save neocris/6324673 to your computer and use it in GitHub Desktop.
Save neocris/6324673 to your computer and use it in GitHub Desktop.
code snippets

iterate over all user global functions

	for (w in window){if (window.hasOwnProperty(w) && typeof window[w] === 'function'){}}

convert NodeList to Array (http://davidwalsh.name/nodelist-array)

	var nodesArray = [].slice.call(document.querySelectorAll("div"));

set canvas to elm background

	document.body.style.background = 'url(' + canvas.toDataURL() + ')';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment