Skip to content

Instantly share code, notes, and snippets.

@ttfkam
ttfkam / async_defer_script.js
Last active May 19, 2016 18:34 — forked from fearphage/async_defer_script.js
Added check for Opera, loading on DOMContentLoaded instead of load. Event only added if Opera has no native support. Replacing script child instead of insert/remove.
// ==UserScript==
// @name defer/async for Opera
// @namespace http://d.hatena.ne.jp/edvakf/
// @license Public Domain
// Updated by Miles Elam <[email protected]>
// ==/UserScript==
(function(window, document, opera) {
function load_script(script, attr) {