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== | |
// @name Google Reader Hatebu Comments | |
// @namespace http://twitter.com/m_satyr | |
// @description Auto-appends Hatebu comments to each Google Reader entry. | |
// @include http*://www.google.*/reader/view/* | |
// @license MIT | |
// ==/UserScript== | |
const HB = 'http://b.hatena.ne.jp/', HBE = HB + 'entry/'; | |
GM_addStyle(<![CDATA[ | |
.hatebu-count {position:absolute; bottom:0; right:0} |
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(){ | |
// ある関数について、最初に呼び出されたときと2回目以降で処理を分ける方法 | |
// 自分自身を書き換える関数 | |
// 初期化コストが低いが、見た目がイマイチ | |
// 関数宣言でなくても良いが、関数宣言なら定義する場所を気にしなくて良くなる | |
function A(){ | |
A = _A; | |
/*一回目の処理*/ | |
// _A.apply(this,arguments);//2回目の処理を呼ぶこともOK |
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 noun_typed_text = { | |
name: 'typed text', | |
suggest: function suggestTyped(txt, htm, cb, si){ | |
return !si && {text: txt, summary: htm, score: .4} | |
}, | |
} | |
var replace = CmdUtils.CreateCommand({ | |
name: 'replace', | |
icon: 'chrome://ubiquity/skin/icons/page_refresh.png', |
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== | |
// @name autoindent | |
// @desc Performs basic auto-indentation on ENTER. | |
// @include main | |
// @include chrome://xqjs/content/xqjs.xul | |
// @include chrome://stylish/content/edit.xul | |
// @include chrome://keyconfig/content/edit.xul | |
// @include chrome://firegestures/content/edit.xul | |
// @compat Fx3.6+ | |
// @author satyr |
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== | |
// @name emblur | |
// @desc Unfocuses <embed>/<object> on focus. | |
// @help Hold shift/ctrl to turn off temporarily. | |
// @include main | |
// @author satyr | |
// @license X | |
// ==/UserScript== | |
function emblur(e){ | |
switch(e.type){ |
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
CmdUtils.CreateCommand({ | |
names: ["666"], | |
domain: "seret.co.il", | |
arguments: [ | |
{role: "object", label: 'what', nountype: noun_arb_text} | |
], | |
description: "seret.co.il חפש סרט באתר", | |
icon: "http://www.seret.co.il/favicon.ico", | |
homepage: "http://sites.google.com/site/ubiquityisrael", | |
author: { name: "Asaf David", email: "[email protected]"}, |
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
<body style="width:160%; height:160%"> | |
<div id="bespin" class="bespin" style="width:80%; height:80%"></div> | |
<script> | |
function onBespinLoad(){ | |
var div = document.getElementById("bespin"); | |
var editor = div.bespin.editor; | |
// fix | |
if(location.search) | |
editor.textView.textInput.domNode.setAttribute('style', ( | |
'position: absolute; z-index: -9999; '+ |
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
<script> | |
HTMLElement.prototype.__defineGetter__('outerHTML', function(){ | |
var _ = this.ownerDocument.createElement('_'); | |
_.appendChild(this.cloneNode(true)); | |
return _.innerHTML; | |
}); | |
HTMLElement.prototype.__defineSetter__('outerHTML', function(h){ | |
var r = this.ownerDocument.createRange(); | |
r.selectNode(this); | |
this.parentNode.replaceChild(r.createContextualFragment(h), 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
// ==UserScript== | |
// @name Opera Style Link Drag | |
// @author Griever satyr | |
// @include main | |
// @include chrome://global/content/viewSource.xul | |
// @include chrome://global/content/viewPartialSource.xul | |
// @version 0.0.1.20100421 | |
// ==/UserScript== | |
Array.forEach(document.querySelectorAll('tabbrowser, browser'), function(b){ | |
b.addEventListener('mousedown', this, true); |
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
<script> | |
function run(fn, arg){ | |
var start = new Date; | |
for(var i = 1e4; i--;) fn(arg); | |
return new Date - start; | |
} | |
var tests = [function(src){ | |
return src.slice(0, src.lastIndexOf("/") + 1); | |
}, function(src){ | |
var a = src.split("/"); |