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
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 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 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 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 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 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 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 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){ |
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 YouTube Manual Play | |
// @include http://www.youtube.com/watch* | |
// @include http://youtube.com/watch* | |
// ==/UserScript== | |
(function(){ | |
var player = document.getElementById('movie_player'); | |
if(!player) | |
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
// ==UserScript== | |
// @name Twitter Title Chop | |
// @include http://twitter.com/* | |
// ==/UserScript== | |
window.addEventListener('load', function(){ | |
document.title = document.title.replace(/Twitter[ \/]*/, ''); | |
}, true); |