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
/** | |
* getAncestorElementByTagName.js | |
* | |
* @version 1.0 | |
* @author think49 | |
*/ | |
/** | |
* get Ancestor Element by tagName. |
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
/** | |
* rfc3986.js | |
* Uniform Resource Identifier (URI): Generic Syntax (RFC3986) | |
* | |
* @version 1.0 | |
* @author think49 | |
* @url https://gist.github.com/770087 | |
* @see <a href="http://www.ietf.org/rfc/rfc3986.txt">www.ietf.org/rfc/rfc3986.txt</a> | |
* @see <a href="http://www.studyinghttp.net/rfc_ja/rfc3986">Uniform Resource Identifier (URI): 一般的構文</a> | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Lingr room bookmarklet</title> | |
<style> | |
html { margin: 0; padding: 0; } | |
body { margin: 0; padding: 0; color: #555; background-color: #fdfdd1; } | |
h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; color: #CB7500; font-family: Georgia, Times, serif; text-shadow: #DDD 0px 0.05em 0.05em; } |
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 : { |
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
---------------------- | |
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
/** | |
* 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
@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
/** | |
* 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
/** | |
* NumberString.js | |
* | |
* @version 2.0.1 | |
* @author think49 | |
* @url https://gist.github.com/857047 | |
*/ | |
var NumberString; |