Skip to content

Instantly share code, notes, and snippets.

if(!Array.slice)
Array.slice = Function.prototype.call.bind(Array.prototype.slice);
@to
to / gist:6870406
Last active December 24, 2015 22:09
<body onkeydown="alert(event.key)"></body>
// ==UserScript==
// @name LDR - Fix Unmatched Print
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
with(unsafeWindow){
addAround(API.prototype, 'post', function(proceed, args, target, name){
switch(target.ap){
case '/api/unread':
case '/api/all':
// ==UserScript==
// @name Gigazine - Load Image Immediately
// @include http://gigazine.net/*
// ==/UserScript==
Array.forEach(document.querySelectorAll('.lazy'), function(img){
img.src = img.dataset.original;
});
@to
to / gist:4748997
Created February 10, 2013 09:47
iOSで以下ファイルをホーム画面にアプリとして置き開くと、テキストのスタイルがリンクのように下線が付き青色になる。中のテキストを0、10、20など以外に変えると発生しない。また30や0を削り3つにしても発生しない。Safariで普通に開くと装飾なしのテキストが表示される。
<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<div style="display: inline-block;">0</div><div style="display: inline-block;">10</div><div style="display: inline-block;">20</div><div style="display: inline-block;">30</div>
</body>
</html>
@to
to / Default.ahk
Created September 14, 2012 02:53
Windows 7 - キーボード設定
;; #InstallKeybdHook
/*
^ Ctrl
+ Shift
! Alt
# Win
<! 左Alt
>! 右Alt
*/
// ==UserScript==
// @id vapor.strobes-34539d25-662b-4891-877a-706e35258457@scriptish
// @name Vapor Strobes
// @version 1.0
// @namespace to.tumblr.com
// @author to
// @include *
// @run-at document-end
// ==/UserScript==
// ==UserScript==
// @id www.rbmaradio.com-9a6f2253-11bd-4aa4-9f5c-cadfa1899da0@scriptish
// @name RBMA Radio - Add Download Link
// @include http://www.rbmaradio.com/shows/*
// @run-at window-load
// ==/UserScript==
var url = unsafeWindow.gon.show.akamai_url;
var ul = document.querySelector('.l-more ul');
@to
to / cache.manifest
Created June 28, 2012 14:24
Offline Application Cache on iOS 5
CACHE MANIFEST
NETWORK:
*
@to
to / gist:2916336
Created June 12, 2012 09:03
Bench, Method vs Grobal Function
var text = new Array(500).join('-');
String.prototype.getLength = function(){
return this.length;
}
function getLength(str){
return str.length;
}