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
/* | |
jQuery AutoLink | |
MIT License | |
*/ | |
(function($) { | |
var url_regexp = /(https?:\/\/[ -熙ぁ-ヴーA-Za-z0-9~\/._\?\&=\-%#\+:\;,\@\']+)/; | |
$.fn.autolink = function() { | |
return this.each(function(){ | |
var desc = $(this); |
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
/* | |
jQuery MouseOverDelay | |
MIT License | |
Usage: | |
Alert 'hoge' after 5 seconds from mouseover #hoge element. | |
$('#hoge').mouseOverDelay(5, function() { alert('hoge') )); | |
*/ | |
(function($) { | |
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
(function($) { | |
$.fn.ajaxPost = function(callback, options) { | |
var default_options = { | |
data_type: 'html', | |
before_send: function() {}, | |
error_handler: function() {} | |
}; | |
options = $.extend(default_options, options) |
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
(function($){ | |
$.fn.eventDelay = function(delay, triger, cancel, callback) { | |
return this.each(function() { | |
var target = $(this); | |
var tid; | |
target.bind(triger, function(){ | |
var self = this; | |
tid = setTimeout(function(){ callback.apply(self) }, delay * 1000) | |
}) |
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
(function($) { | |
$.fn.preInput = function(txt, options) { | |
var default_options = { | |
class_name: 'pre-input' | |
}; | |
options = $.merge(default_options, options || {}); | |
return this.each(function(){ | |
if(typeof this.value == 'undefined') return; |
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
(function($) { | |
$.fn.zebra = function(options){ | |
var default_options = { | |
class_name: 'zebra', | |
interval: 2 | |
} | |
options = $.extend(default_options, options || {}) | |
return this.each(function(i){ |
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
// http://subtech.g.hatena.ne.jp/secondlife/20090302/1235984992 | |
// IE でも同じように | |
function set_timeout() { | |
var func = Array.prototype.shift.apply(arguments); | |
var delay = Array.prototype.shift.apply(arguments); | |
return (function(args) { | |
return setTimeout(function(){ func.apply(this, args) }, delay) | |
})(arguments) | |
} |
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
// ==UserScript== | |
// @name delicious fliter | |
// @namespace http://opera.higeorange.com/ | |
// @include http://delicious.com/* | |
// ==/UserScript== | |
(function() { | |
var filter_urls = [ | |
'http://*.nicovideo.jp/' | |
]; |
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
// ==UserScript== | |
// @description add a link of hatena bookmark entry page to delicious url page | |
// @include http://*delicious.com/url/* | |
// ==/UserScript== | |
(function() { | |
var hub = "http://b.hatena.ne.jp/entry/"; | |
var hib = "http://b.hatena.ne.jp/entry/image/normal/"; | |
var up = document.getElementById("url"); | |
var url = up.firstChild.href; |
OlderNewer