This file contains hidden or 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.prototype.throttleAndDebounce = function(threshold, delay){ | |
threshold = threshold || 100; | |
delay = delay || threshold; | |
var me = this; | |
var expire = 0; | |
var timeout; | |
return function(){ | |
if(timeout) | |
clearTimeout(timeout); |
This file contains hidden or 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== | |
// @id www.google.com-3ca00d86-e5af-4ad5-beca-fc6012a7500b@to.tumblr.com | |
// @name Google - Remove Tracking Listener | |
// @version 1.0 | |
// @namespace to.tumblr.com | |
// @include http://www.google.com/search* | |
// @run-at window-load | |
// ==/UserScript== | |
setInterval(function process(){ |
This file contains hidden or 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
Tombloo.Service.actions.register( { | |
name : 'Collect File Links', | |
type : 'context', | |
execute : function(ctx){ | |
var self = this; | |
var urls = {}; | |
var RE = /((anonym\.to|share|mediafire|send|upload|rapidspread)|(zip|mp3)$)/; | |
forEach(ctx.document.links, function(l){ | |
if(RE.test(l.href)) |
This file contains hidden or 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
// 僕こうかな…けっこう一貫してないけど | |
// 先頭近辺での揃えのスペースがすごく少ないな | |
if (( | |
cond_a || cond_b || | |
cond_c || cond_d) || cond_e) { | |
} | |
test( | |
value1, value2, | |
value3, value4); |
This file contains hidden or 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
connect(grobal, 'environment-load', function(){ | |
var gm = Cc['@greasemonkey.mozdev.org/greasemonkey-service;1']; | |
if(gm){ | |
gm = gm.getService().wrappedJSObject; | |
addBefore(gm, 'evalInSandbox', function(){ | |
for(var i=0, len=arguments.length ; i<len ; i++){ | |
var arg = arguments[i]; | |
if(typeof(arg) == 'object'){ | |
arg.GM_addStyle = function(){ | |
alert('patched'); |
This file contains hidden or 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(){ | |
function hash(s){ | |
return s.split('').join('\u200E'); | |
} | |
QuickPostForm.descriptionContextMenus.push({ | |
name : 'No Searchable', | |
execute : function(elmText, description){ | |
var text = elmText.value.slice(elmText.selectionStart, elmText.selectionEnd); | |
text? |
This file contains hidden or 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
var count = num = 1000; | |
var start = Date.now(); | |
function proc(){ | |
if(!--count){ | |
console.log((Date.now() - start) / num); | |
return; | |
} | |
defer(); |
This file contains hidden or 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
loadPolicies.push(function(contentType, contentLocation, requestOrigin, context, mimeTypeGuess, extra){ | |
try{ | |
var url = contentLocation.spec; | |
if(contentType == IContentPolicy.TYPE_DOCUMENT) | |
return false; | |
if(/\/safestream\.php/.test(url)){ | |
if(url.match('rbmaradio.de')) | |
url = url.replace('rbmaradio.de', 'archive1.rbmastream.net'); | |
addTab(url); |
This file contains hidden or 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
Tombloo.Service.actions.register({ | |
name : 'BBモバイルポイントをコピーする', | |
type : 'context', | |
check : function(ctx){ | |
return new RegExp('/bbmp.softbanktelecom.co.jp/cgi-bin/service/bbmobile_search/list_city.cgi\\?ac=').test(ctx.href); | |
}, | |
execute : function(ctx){ | |
// http://bbmp.softbanktelecom.co.jp/cgi-bin/service/bbmobile_search/list_city.cgi?ac=13 | |
var self = this; |
This file contains hidden or 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
update(MochiKit.Style.Coordinates.prototype, { | |
equals : function(target){ | |
return target && (this.x == target.x && this.y == target.y); | |
} | |
, | |
clone : function(){ | |
return new Coordinates(this.x, this.y); | |
} | |
, | |
getDistance : function(pos){ |