Skip to content

Instantly share code, notes, and snippets.

View ironblock's full-sized avatar
🚙
Nyoom

Corey Vixie ironblock

🚙
Nyoom
  • La Honda, CA
View GitHub Profile
@ironblock
ironblock / restore_copy_cut_paste.js
Last active August 9, 2021 17:24
Restore cut/copy/paste functionality on webpages that try to block it
/**
* RESTORE COPY/CUT/PASTE FUNCTIONALITY TO WEBPAGES
*
* Sometimes cut, copy, and paste are blocked by genius web developers or their
* super genius boss, who think that blocking these features actually works, as
* though a webpage was somehow an application running in "the cloud" that they
* have control over, rather than a jumped up text document running entirely on
* the user's machine.
*
* Worse, some think that it's somehow "more secure" if you can't paste a
@isaacs
isaacs / comma-first-var.js
Created April 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",