Skip to content

Instantly share code, notes, and snippets.

@-moz-document url("chrome://browser/content/browser.xul"){
#context-sendlink, #context-sendimage, #context-sendpage
, #PlacesToolbarItems .toolbarbutton-icon:not([src])
, #PersonalToolbar
{display:none !important}
toolbar {min-height:12px !important}
#TabsToolbar {height:17px !important}
var gId = 42; // used for avoiding needless preview updates when typing
CmdUtils.CreateCommand({
name: "memo",
description: "Lets you jot a memo for the page.",
author: "satyr",
argument: noun_arb_text,
execute: function memo_execute({object: {html}}) {
var {href} = CmdUtils.getDocument().location;
var list = Bin[href]() || [];
list.push(html);
@satyr
satyr / midorisan.ubiq.js
Created August 24, 2009 08:06
Opens Midori-san in a new tab.
0,function(){{}
const URL = 'http://www.smbc.co.jp/midorisan/';
CmdUtils.CreateCommand({
name: 'midorisan',
description: 'Opens '+ 'Midori-san'.link(URL) +' in a new tab.',
author: 'satyr', license: 'MIT',
icon: 'http://www.smbc.co.jp/favicon.ico',
arguments: {object: noun_type_number, goal: /^\d+/},
execute: function({object: {data: from}, goal: {text: to}}){
var me = this;
// ==UserScript==
// @name Merriam-Webster auto audio
// @namespace http://d.hatena.ne.jp/murky-satyr
// @description s/embed/audio/
// @include http://www.merriam-webster.com/cgi-bin/audio.pl?*
// ==/UserScript==
var embed = document.getElementsByTagName('embed')[0];
var audio = document.createElement('audio');
audio.src = embed.src;
const BZ = 'http://www.babelzilla.org';
const PLocale = 'general.useragent.locale';
CmdUtils.CreateCommand({
name: 'change locale',
icon: 'chrome://ubiquity/skin/icons/favicon.ico',
author: {name: 'satyr', email: '[email protected]'},
license: 'MIT',
description: 'Changes your Firefox locale.',
argument: CmdUtils.NounType('locale', <![CDATA[
af ar as be bg bn-BD bn-IN ca cs cy da de el en-GB en-US eo es-AR es-CL
@satyr
satyr / comics.com.ubiq.js
Created August 6, 2009 22:36
Opens all the latest strips on http://comics.com in a new tab.
CmdUtils.CreateCommand({
name: 'comics.com',
description: (
'Opens all the latest strips on '+
'<a href="http://comics.com">comics.com</a> in a new tab.'),
author: {name: 'satyr', email: 'murky.satyr\x40gmail.com'},
license: 'MIT',
icon: 'http://c0389161.cdn.cloudfiles.rackspacecloud.com/img/v1/favicon.ico',
argument: CmdUtils.NounType('cmc type', ['Comics', 'Editorials'], '^'),
execute: function cmc_execute(args){
#!ruby
unless $*[0]
puts "Usage: ruby #$0 [-[ef]] input"
puts ' -e: execute'
puts ' -f: focus'
exit 1
end
require 'net/telnet'
@satyr
satyr / tr.im.ubiq.js
Created July 30, 2009 20:44
Trims a URL, or untrims a trimmed URL.
CmdUtils.CreateCommand({
name: 'tr.im',
description: 'Trims a URL, or untrims a trimmed URL.',
author: {name: 'satyr', email: '[email protected]'},
license: 'MIT',
homepage: 'http://tr.im/',
icon: 'http://tr.im/favicon.ico',
arguments: {
object: noun_type_url,
'alias custom URL': /\w+/,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<!-- Online here: http://ejohn.org/files/bugs/isObjectLiteral/ -->
<title>isObjectLiteral</title>
<style>
li { background: green; } li.FAIL { background: red; }
iframe { display: none; }
</style>
CmdUtils.CreateCommand({
name: 'toggle chat mode',
execute: function tcm_execute(){
var {gUbiquity} = context.chromeWindow;
var on = gUbiquity._tcmState ^= 1;
gUbiquity.msgPanel.removeEventListener('keypress',
gUbiquity._tcmListener,
true);
if(on){
gUbiquity.msgPanel.addEventListener('keypress', this._listener, true);