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
/** | |
* | |
* Here's a thing that will look through all the text nodes of a document, and | |
* upon encountering an emoji codepoint, will replace it with an image. | |
* For now, those images are pulled from GitHub, which isn't very nice, so I | |
* need to find a more suitable host. | |
* | |
* Much of this code was gleaned from staring at the minified GitHub JS. | |
* | |
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License. |
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
/** | |
* Determine if this browser supports emoji. | |
* | |
* Modified from https://gist.github.com/mwunsch/4710561 | |
* and probobly originally github's javascript source | |
*/ | |
function doesSupportEmoji() { | |
var context, smiley; | |
if (!document.createElement('canvas').getContext) return; | |
context = document.createElement('canvas').getContext('2d'); |
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
// 更新: | |
// 05.27: 1、保证回调执行顺序:error > ready > load;2、回调函数this指向img本身 | |
// 04-02: 1、增加图片完全加载后的回调 2、提高性能 | |
/** | |
* 图片头数据加载就绪事件 - 更快获取图片尺寸 | |
* @version 2011.05.27 | |
* @author TangBin(PS:我不是作者,我只是代码的搬运工) | |
* @see http://www.planeart.cn/?p=1121 | |
* @param {String} 图片路径 |
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
/* display:flex; */ | |
.flex { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } | |
/* for Android 4.3- */ | |
.flex > * {display: block;} | |
/* row reverse */ | |
.flex.flex--reverse { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: row-reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } | |
/* column */ | |
.flex--clo { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: normal; -moz-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } | |
/* column reverse*/ | |
.flex--col.flex--reverse { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } |