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
| /* | |
| * jQuery_TumblrMosaic.js | |
| * | |
| * Varsion: 0.0.4 | |
| * PublishDate: 2012-03-11 18:18 | |
| * LastUpdate : 2012-04-06 19:21 | |
| * Copyright (c) 2012 ethertank.jp | |
| * Licensed under the MIT | |
| * | |
| * jQuery required (tested on 1.7.1) |
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 lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <article> | |
| <h1>仲村みう</h1> | |
| <p>仲村みう</p> |
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
| var getIndividualCSSPropertyValue = function(prop, propValue, IndividualProp) { | |
| var d = document.createElement("div"); | |
| d.style[prop] = propValue; | |
| return d.style[IndividualProp]; | |
| }; |
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
| Object.prototype.length || (Object.prototype.length = function() { | |
| var len = -1; | |
| for (prop in this) { | |
| len++; | |
| } | |
| return len; | |
| }); |
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
| Date.prototype.getFormatDate = function getFormatDate() { | |
| var d = this, | |
| o = {}; | |
| o.date = d; | |
| o.json = d.toJSON(); | |
| o.YYYY = d.getFullYear(); | |
| o.M = d.getMonth() + 1; | |
| o.D = d.getDate(); | |
| o.wday = d.getDay(); |
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
| /* 先頭行: 他のスクリプトでのセミコロン忘れに備え、且つ、予約語でないundefinedの書換えによる誤動作を防いでいる。*/ | |
| ;(function($, undefined) { | |
| "use strict"; | |
| $.fn.myPlugIn = function(option) { | |
| var a, b, c; | |
| //※未設定のオプション項目に初期値を設定 | |
| option = $.extend({ | |
| opt1: null, |
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
| function addClass(elem, newClassName) { | |
| var className, classes, classesLength; | |
| if(typeof elem === 'string') { elem = document.getElementById(elem); } | |
| if(elem === null || elem.nodeType !== 1 || typeof newClassName !== 'string') { return null; } | |
| className = elem.className; | |
| classes = newClassName.split(' '), | |
| classIndex = classes.length; |
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
| Array.prototype.min || (Array.prototype.min = function() { | |
| return this.length ? Math.min.apply("",this) : undefined; | |
| }); | |
| /* check result *//* | |
| [1, 2, 3, 0].min() ====> 0 | |
| typeof[1, 2, 3, 0].min() ====> number | |
| [1, 2, 3, +100].min() ====> 1 | |
| typeof[1, 2, 3, +100].min() ====> number | |
| ["1", "2", "3", "+100"].min() ====> 1 | |
| typeof["1", "2", "3", "+1"].min() ====> number |
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
| Object.prototype.extend || (Object.prototype.extend = function(e) { | |
| if (!e && (this !== null) && e instanceof Object !== "object") throw new Error("引数はオブジェクトで!一個だけな!(・∀・)"); | |
| for (var p in e) e.hasOwnProperty(p) && (this[p] = e[p]); | |
| return this; | |
| }); |
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
| (function(AP, isF) { | |
| 'use strict'; | |
| // isArray : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray | |
| Array.isArray || (Array.isArray = function (a) { | |
| return Object.prototype.toString.call(a) == "[object Array]"; | |
| }); | |
| // toSource(Non-standard) | |
| AP.toSource || (AP.toSource = function() { |