This file contains hidden or 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
/** | |
* compatible-event.js | |
* | |
* @version 0.9.4b | |
* @author think49 | |
* @url https://gist.github.com/882821 | |
*/ | |
'use strict'; |
This file contains hidden or 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
/** | |
* get-class.js | |
* | |
* @version 1.0.4 | |
* @author think49 | |
* @url https://gist.github.com/862098 | |
*/ | |
function getClass (arg) { | |
var _class; |
This file contains hidden or 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
/** | |
* get-type.js | |
* | |
* @version 1.0.2 | |
* @author think49 | |
* @url https://gist.github.com/862085 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
function getType (value) { |
This file contains hidden or 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
/** | |
* NumberString.js | |
* | |
* @version 2.0.1 | |
* @author think49 | |
* @url https://gist.github.com/857047 | |
*/ | |
var NumberString; |
This file contains hidden or 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
/** | |
* abnf.js | |
* | |
* [RFC 5234] Augmented BNF for Syntax Specifications: ABNF | |
* http://www.ietf.org/rfc/rfc5234.txt | |
* http://www.cam.hi-ho.ne.jp/mendoxi/rfc/rfc5234j.html | |
* | |
* @version 0.1 | |
* @author think49 | |
*/ |
This file contains hidden or 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
@charset "UTF-8"; | |
/** | |
* print.css | |
* | |
* @version 1.0.1 | |
* @author think49 | |
*/ | |
#print { margin: 1em 0; padding: 0.5em; border: 1px solid #999; color: black; background-color: #EFEFEF; font-family: monospace; } |
This file contains hidden or 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
/** | |
* percentEncode.js | |
* | |
* @version 0.9.2 | |
* @author think49 | |
* @url https://gist.github.com/805428 | |
*/ | |
var percentEncode = (function () { |
This file contains hidden or 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
---------------------- | |
Fisher–Yates shuffle | |
---------------------- | |
* Fisher and Yates' original method | |
1. Write down the numbers from 1 to N. | |
2. Pick a random number k between one and the number of unstruck numbers remaining (inclusive). | |
3. Counting from the low end, strike out the kth number not yet struck out, and write it down elsewhere. | |
4. Repeat from step 2 until all the numbers have been struck out. |
This file contains hidden or 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
/** | |
* outerHTML.js | |
* | |
* @version 1.4 | |
* @author think49 | |
*/ | |
if (!('outerHTML' in document.createElement('p')) && 'innerHTML' in document.createElement('p') && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object')) { | |
(function () { | |
var _Node = (typeof Node === 'function' || typeof Node === 'object') ? Node : { |
This file contains hidden or 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
/** | |
* Twitter-outputHTML-bookmarklet.js | |
* | |
* @version 1.2 | |
* @author think49 | |
*/ | |
if (!('outerHTML' in document.createElement('p')) && 'innerHTML' in document.createElement('p') && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object')) { | |
(function () { | |
var _Node = (typeof Node === 'function' || typeof Node === 'object') ? Node : { |