Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Chemr for NinjaKit
// @namespace http://lowreal.net/
// @include http://search.cpan.org/*
// @include http://www2u.biglobe.ne.jp/*
// @include http://developer.android.com/*
// @include http://api.jquery.com/*
// @include http://www.ruby-lang.org/*
// @include http://www.haskell.org/*
// @include http://developer.apple.com/*
// ==UserScript==
// @name AutoPatchWork for Opera
// @author os0x, edvakf
// @namespace http://ss-o.net/
// @description Automatically loads the next page and inserts into current page when you reach the end of the page. like AutoPagerize.
// @license The MIT License
// @version 0.2
// @include *
// @released 2010-07-07
// @updated 2010-07-07
// ==UserScript==
// @name hitode pack
// @namespace http://ss-o.net
// @include http://twitter.com/*
// ==/UserScript==
function hitode_pack(){
Array.prototype.forEach.call(document.querySelectorAll('.entry-content, .status') , function(a){
var text = a.innerHTML.trim();
if (text[0] === text[1]) {
var l = 0;
@os0x
os0x / NodeList.prototype.js
Created May 17, 2010 09:39
JavaScript: リストを配列のように扱う(for Chrome5)
(function extend_NodeList(proto){
if(Object.defineProperty){
Object.getOwnPropertyNames(Array.prototype).filter(function(prop){
return typeof Array.prototype[prop] === 'function';
}).forEach(extend_by_array);
}
function extend_by_array(name){
if (name in NodeList.prototype){
return;
}
// ==UserScript==
// @name googlechromereleases.blogspot.com
// @description Google Chromeのバージョン表記からダウンロードリンクを作る
// @namespace http://ss-o.net/
// @include http://googlechromereleases.blogspot.com/*
// @require http://gist.github.com/184276.txt
// ==/UserScript==
(function () {
var TEXT = 'descendant::text()[contains(self::text(),".") and not(ancestor::' + ['a', 'textarea', 'script', 'style', 'head'].join(' or ancestor::') + ')]';
var exp = /\d+\.\d+\.(\d+\.\d+)/;
@os0x
os0x / gist:369663
Created April 17, 2010 16:42 — forked from azu/gist:369595
// IEでも動くように(実質的には弄ったのはtest4のexecのみ)
var r = [];
var test = new Date*1;
for(var i=0;i<10000;i++){
var src = "http://example.com/lab/test.js"
src.substring(0,src.lastIndexOf('/')+1)
}
r.push(new Date-test);
var test2 = new Date*1;
(function(){
// ある関数について、最初に呼び出されたときと2回目以降で処理を分ける方法
// 自分自身を書き換える関数
// 初期化コストが低いが、見た目がイマイチ
// 関数宣言でなくても良いが、関数宣言なら定義する場所を気にしなくて良くなる
function A(){
A = _A;
/*一回目の処理*/
// _A.apply(this,arguments);//2回目の処理を呼ぶこともOK
// http://gist.github.com/raw/315047/e07932e73fb928365425f13bd7376a43b8433071/patchworkinput.txt を開いた状態で、Chromeのコンソールで実行
// かなり無駄を省きました… 速度はV8 2.1.0.1 で Quad Core 2.66GHzで360msくらい
//* この行の先頭の/で使用するデータ切り替えます
var text=[
'ABAAAABBBA',
'ABABABABBB',
'BABBBAABBA',
'ABBABBBBBB',
'BBABABAAAB',
// ==UserScript==
// @name fldr_show_fc2_images.user.js
// @namespace http://d.hatena.ne.jp/os0x/
// @description Make fc2 images viewable on LDR/Fastladder
// @include http://reader.livedoor.com/reader/
// @include http://reader.livedoor.com/public/*
// @include http://fastladder.com/reader/
// ==/UserScript==
// via http://gist.github.com/48621
@os0x
os0x / tumblr_dashboard_jk_disable.user.js
Created January 2, 2010 08:39
tumblr_dashboard_jk_disable.user.js
// ==UserScript==
// @name tumblr Dashboard jk disable
// @namespace http://ss-o.net/
// @description kill tumblr Dashboard Key Commands for Chrome
// @include http://www.tumblr.com/*
// ==/UserScript==
// via http://otsune.tumblr.com/post/233978426/faq-autopagerize
location.href="javascript:window.key_commands_are_suspended = true;void 0;";