🧙♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(root, doc) { | |
function AbstractDomBuilder(tagName, attrs, innerHTML) { | |
this.tagName = tagName || 'div' | |
this.attrs = attrs || {} | |
this.innerHTML = innerHTML || '' | |
} | |
AbstractDomBuilder.prototype.build = function() {} | |
function NativeDomBuilder() { | |
AbstractDomBuilder.apply(this, arguments) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(root) { | |
function WeakMap() { | |
if (!(this instanceof WeakMap)) { | |
throw new TypeError('Illegal invocation') | |
} | |
var indexes = [] | |
, values = [] | |
this.has = _has.bind(this, indexes, values) | |
this.set = _set.bind(this, indexes, values) | |
this.get = _get.bind(this, indexes, values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function (root, doc) { | |
'use strict' | |
var element = doc.documentElement | |
, iframe = doc.createElement('iframe') | |
, globals = Object.keys(root) | |
// Append iframe to the DOM | |
element.appendChild(iframe) | |
// Get inherited global variables | |
var inherited = Object.keys(iframe.contentWindow) | |
// Detach iframe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html manifest="manifest.appcache"> | |
<body> | |
<script> | |
(function (root) { | |
// Local variables | |
var parent = root.parent, | |
location = root.location; | |
// Add event when root is loaded | |
root.addEventListener('load', function onRootLoad() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function () { | |
var results = [], | |
log = [], | |
list = document.styleSheets; | |
if (!list) { | |
return; | |
} | |
for (var i = 0, x = list.length; i < x; i++) { | |
countSheet(list[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Casper JS Instance | |
var casper = require('casper').create(); | |
// Scan-mx domain | |
var domain = 'http://www.scan-mx.com'; | |
// URL Separator | |
var separator = '/'; | |
// Command Line Argument: Manga | |
var manga = casper.cli.get(0) || 'naruto'; | |
// Command Line Argument: Episode Number | |
var episode = casper.cli.get(1) || 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
var QueryString = (function() { | |
function Class(){ | |
if (this instanceof Class) { | |
} else { | |
throw new Error("Illegal constructor"); | |
} | |
}; | |
Class.get = function(/*String*/name) { |
NewerOlder