Skip to content

Instantly share code, notes, and snippets.

var gQuery;
CmdUtils.makeSearchCommand({
name: "Directory",
url: "http://www10.go.com.mt/edirnew_dev/modules/edir_checkquery.asp",
arguments: {suggest: function (txt) {
gQuery = txt;
return noun_arb_text.suggest(txt);
}},
get postData() {
if(!gQuery) return null;
@satyr
satyr / hackContentAccess.ub.js
Created April 3, 2010 16:17
brings back the good ol' single Alt for preview access
function ubiquityLoad_hackContentAccessForPreview(U){//function cmd_
const {prefs} = Utils, Shift = 1, Ctrl = 2, Alt = 4, Meta = 8;
U.panel.addEventListener('popupshowing', function hack(){
var orig = prefs.get('ui.key.contentAccess');
Utils.listenOnce(this, 'popuphidden', function restore(){
prefs.set('ui.key.contentAccess', orig);
});
prefs.set('ui.key.contentAccess', Alt);
}, false);
}
@satyr
satyr / contexpector.uc.js
Created April 3, 2010 03:50
contexpector.uc.js
// ==UserScript==
// @name Contexpector
// @namespace http://www.mozilla.org/MPL/
// @description Right click anywhere to DOMInspect the element.
// @include *
// @exclude chrome://global/content/alerts/alert.xul
// @exclude chrome://global/content/commonDialog.xul
// @exclude javascript:*
// @compatibility 3.5+
// @author LouCypher Alice0775 satyr
@satyr
satyr / navkeys.uc.js
Last active May 11, 2016 16:16
navkeys
/*==uc==
@name navkeys
@desc personal key binds for caret-movement, scrolling and selection
@include main
@include ~^chrome://global/content/view(?:Partial)?Source\.xul
@author satyr
==/uc==*/
https://developer.mozilla.org/ja/XUL/List_of_commands
NavKey = {s: {
H : 'scrollLeft',
@satyr
satyr / caddyr.rb
Created March 30, 2010 20:16
caddyr
GOLF_DIR = File.join(ENV['HOME'], '.golf')
require 'pstore'
require 'caddy/db'
require 'net/http/multipart'
Net::HTTP.version_1_2
@file = $*[0]
problem = $*[1] || file2problem(File.basename(@file, File.extname(@file)))
@data = {
'problem' => problem =~ /^http:\/\/golf.shinh.org\/p.rb\?/ && $',
<script>
function pr(){ document.writeln.apply(document, arguments) }
function go(code, end){
try{ var r = eval(code) } catch(e) { r = e }
pr(code, '\n\t', r);
end ? pr('') : go(code + ' = location +" "+ new Date', 1);
}
pr('<pre>');
go('localStorage._');
go('globalStorage[location.hostname]._');
@satyr
satyr / radiko_lite.user.js
Created March 27, 2010 16:45
radiko_lite.user.js
// ==UserScript==
// @name radiko lite
// @description Simplifies radiko_player, inlining it onto the timetable.
// @namespace http://twitter.com/m_satyr
// @include http://radiko.jp/player/player.html#*
// @include http://radiko.jp/timetable/
// ==/UserScript==
if((banner = document.querySelector('#header > .banner')))
return addEventListener('load', function(){
var parent = banner.parentNode
if(!Utils._oUIB){
let U = Utils.__proto__;
U._oUIB = Utils.openUrlInBrowser;
U.openUrlInBrowser = function openUrlInBrowserForegroundPlease(){
U.prefs.set('browser.tabs.loadInBackground', false);
U._oUIB.apply(0, arguments);
U.prefs.set('browser.tabs.loadInBackground', true);
};
}
//function cmd_
@satyr
satyr / pipes_copy_rss_url.user.js
Created March 16, 2010 19:48
Pipes: Copy RSS URL
// ==UserScript==
// @name Pipes Copy RSS URL
// @description Copies a human readable version of it.
// @namespace http://pipes.yahoo.com/matyr
// @include http://pipes.yahoo.com/pipes/pipe.info?_id=*
// ==/UserScript==
var btn = document.createElement('button');
btn.innerHTML = '<u>C</u>opy RSS URL';
btn.accessKey = 'C';
btn.addEventListener('click', function(e){
@satyr
satyr / mailto.ubiq.js
Created March 13, 2010 04:31
mailto (for Thunderbird etc.)
CmdUtils.CreateCommand({
name: 'mailto',
argument: noun_arb_text,
execute: function({object: {text}}){
var {title, URL} = CmdUtils.getDocument();
Utils.currentChromeWindow.gBrowser.loadURIWithFlags(
'mailto:'+ encodeURIComponent(text) + Utils.paramsToString({
subject: "'"+ title +"'",
//body: URL +'\n\n'+ CmdUtils.getSelection(),
'html-body': ((<><a href={URL}>{URL}</a><br/><br/></>) +