Skip to content

Instantly share code, notes, and snippets.

View ArronKing's full-sized avatar

Arron King ArronKing

View GitHub Profile
@ArronKing
ArronKing / Clipboard.js
Last active February 20, 2019 16:19 — forked from rproenca/Clipboard.js
Copy text to clipboard using Javascript. It works on Safari (iOS) and other browsers.
window.Clipboard = (function(window, document, navigator) {
var textArea,
copy;
function isOS() {
return navigator.userAgent.match(/ipad|iphone/i);
}
function createTextArea(text) {
textArea = document.createElement('textArea');