Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name XULPlanet -> MDC
// @namespace http://github.com/to
// @include http://www.xulplanet.com/references/xpcomref/ifaces/*
// ==/UserScript==
var name = location.href.match(/.*\/([^\.]*)\..*/)[1];
location.href = 'https://developer.mozilla.org/en/' + name;
shortcutkeys['CTRL + D'] = {
description : 'LDR hatebu comment',
execute : function(e){
var fx = getMostRecentWindow();
var win = wrappedObject(fx.content);
if(!/(http:\/\/reader\.livedoor\.com\/reader\/)/.test(win.location))
return;
cancel(e);
function remove(path){
var shell = new ActiveXObject('Shell.Application');
var fileSystem = WScript.createObject('Scripting.FileSystemObject');
if(fileSystem.fileExists(path)){
var target = fileSystem.getFile(path);
var folder = shell.nameSpace(target.parentFolder.path);
shell.nameSpace(10).moveHere(folder.items().item(target.name));
while(fileSystem.fileExists(path))
// ==UserScript==
// @name LDR - Feed Filter
// @namespace http://github.com/to
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
var FILTERS = [
function(c){
if(/zLLQDaZE3hGdsj811ZzWFw/.test(c.feedlink))
c.title = c.feedlink.replace(/.*username=(.*)/, 'Soundcloud: $1');
// ==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;
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){
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;
@to
to / gist:748186
Created December 20, 2010 09:14
rbma.js
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);