Skip to content

Instantly share code, notes, and snippets.

@ArcCosine
ArcCosine / purify.js
Created January 12, 2009 15:23 — forked from edvakf/purify.js
javascript: (function(doc) {
var add = doc.addEventListener;
add('mouseover',overHandler,false);
add('mouseout',outHandler,false);
add('click',clickHandler,false);
add('keypress',keyHandler,false);
function removeListeners(){
var rm = doc.removeEventListener;
rm('mouseover',overHandler,false);
rm('mouseout',outHandler,false);
// ==UserScript==
// @name fastladder_show_fc2_images.user.js
// @namespace http://d.hatena.ne.jp/edvakf/
// @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==
(function(w,d){
// ==UserScript==
// @name Outputz for Opera
// @author mallowlabs (http://d.hatena.ne.jp/mallowlabs)
// http://outputz.com
// @include http://outputz.com/?from=userjs
//
// ------ Add urls to track your inputs ------
// @include http://twitter.com/home
// @include http://d.hatena.ne.jp/*/edit
// -------------------------------------------
@ArcCosine
ArcCosine / gist:70206
Created February 25, 2009 15:12 — forked from mzp/gist:27341
// ==UserScript==
// @name opera focus imitation
// @namespace
// @description this script imitate focus on opera by shift + cursor key
// @include *
// ==/UserScript==
// 問題:位置取得の効率が悪すぎる
// 要素が重なっていると隣の要素として判定ができない
// iframe 内には入れない、または出れない
window.addEventListener('load',function(){
// ==UserScript==
// @name keyconfig for Chrome
// @namespace http://d.hatena.ne.jp/Griever/
// @description keyconfig for google chrome
// @author Griever
// @version 1.0
// ==/UserScript==
var func = {
goToParent: function(){
// ==UserScript==
// @name twitter.AutoPager
// @namespace http://ss-o.net/
// @version 0.2
// @include http://twitter.com/*
// @include https://twitter.com/*
// ==/UserScript==
// Thx! id:Constellation
(function autopager(unsafeWindow,loaded){
function init(){
alert('Hello, Gist world!');
}
@ArcCosine
ArcCosine / policy_modoki.js
Created April 2, 2012 17:56
policy_organization.jsはjQueryを使って書くとコレくらい短くなる。
var tab = {
init: function(){
if($('#tab01') != null){
//Event is assigned only once
for(var i = 1; i<19; i++) {
(function(num){
$('#tab' + ("0"+num).slice(-2)).click(function(){
tab.change(num);
return false;
});
@ArcCosine
ArcCosine / Simple Slide Show
Created October 31, 2012 23:12
refactor simple slide show code.
/**
* 簡易スライドショー
*
* nextボタンを押したときに画像を切り替える簡単な
* スライドショーのサンプルプログラムです。
* */
(function(document){
// 写真を表示
function showPhoto(){
(function(){
var d='http://domyojikarin.com/dmjcookie/img/',as = Game.Loader.assets,r = RegExp;
for( var i in as ){
var v = as[i], a = v.alt;
if( /(pe.*t).*.p/.exec(a) || /(S.*\d).p/.exec(a) ){
v.src = d+(r.$1[0]=='p' ? r.$1+'Dmj':'dmj'+r.$1)+'.png';
}
}
})()