Skip to content

Instantly share code, notes, and snippets.

View gist:3e5909cc2e7592789c95
(function(){
var avatar = document.querySelector('#avatar_me'),
pos,
keys = [];
var SPEED = 5;
document.addEventListener('keydown', keydown, false);
document.addEventListener('keyup', keyup, false);
function keydown(e) {
@pikotea
pikotea / gist:6462456
Last active Dec 22, 2015
innerHTMLのスピードテスト
View gist:6462456
// firefox:
// test1a -> 18.83772399999998
// test1b -> 12.661566999999877
// test1c -> 0.32783100000006016
// chrome:
// test1a -> 53.948999993735924
// test1b -> 28.740999987348914
// test1c -> 0.7929999846965075
// 準備
@pikotea
pikotea / gist:3491756
Created Aug 27, 2012
jQuery Mobileでホワイトリスト使って読み込むページを制限する
View gist:3491756
var a = document.createElement('a');
function getInfo(url) {
a.href = url;
return {
host: a.host,
pathname: a.pathname
};
}
$(document).on('pagebeforeload', function(e, data){
// ホワイトリスト