Skip to content

Instantly share code, notes, and snippets.

View ba3r's full-sized avatar

Michael Baer ba3r

View GitHub Profile
@ba3r
ba3r / wave.js
Created October 23, 2009 22:17
google wave search
/* v0.68 Google Wave Search */
CmdUtils.CreateCommand({
names: ["wave"],
icon: "http://wave.google.com/favicon.ico",
description: "Operates Google Wave Search",
help: (<>
<ul><li>Use the shortcuts on the left to quickly get into your Wave folders</li>
<li>Search for keywords and/or use the advanced options by typing or clicking them</li></ul></>) + "e.g. wave mozilla has:image -is:muted",
author: {name: "Michael Baer", homepage: "http://twitter.com/synapsos"},
license: "GPL",
@ba3r
ba3r / x.js
Created October 18, 2009 20:49
/* This is a template command. */
CmdUtils.CreateCommand({
names: ["what"],
icon: "http://www.mozilla.com/favicon.ico",
description: "A short description of your command.",
help: "How to use your command.",
author: {name: "Your Name", email: "[email protected]"},
license: "GPL",
homepage: "http://labs.mozilla.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],
@ba3r
ba3r / routerank.js
Created October 14, 2009 01:30
routerank [en|de|fr|es]
const
R = 'http://routerank.com/';
I = 'http://lh5.ggpht.com/_9QZJW2qJEGU/SwNLnkFvRAI/AAAAAAAAAqM/1tB2zfjefYQ/routerank.png';
N = 'Michael Baer';
T = 'https://gist.github.com/synapsos';
L = 'GPL';
S1 = '<span style=\'text-transform:capitalize\'>';
S2 = '</span>';
//v1.65
//version 1.56b - Search for a route with Google Maps (supports many languages)
var from_prepos;
var to_prepos;
var geo = CmdUtils.getGeoLocation().country;
//German
if ( geo == 'Germany' || geo == 'Austria' || geo == 'Switzerland' )
{from_prepos = "von"; to_prepos = "nach";} else {
//Japanese
if ( geo == 'Japan' )
/* Davos Vote */
CmdUtils.CreateCommand({
names: ["davos"],
icon: "chrome://ubiquity/skin/icons/youtube.ico",
description: "Vote",
help: "Just vote.",
author: {name: "Michael", homepage: "http://twitter.com/synapsos"},
license: "GPL",
homepage: "http://youtube.com/davos",
preview: function preview(pblock) {
/* v0.3 OpenClosed.de */
CmdUtils.CreateCommand({
names: ["openclosed", "oc"],
icon: "http://synapsos.kilu.de/ubiquity/openclosed/favicon.ico",
description: "Suche für Öffnungszeiten in Deutschland.",
help: "z.B. open kaufland berlin oder oc freiberg aldi 09599.",
author: {name: "Michael Baer", homepage: "http://twitter.com/synapsos"},
license: "GPL",
homepage: "http://www.openclosed.de/",
arguments: [{role: 'object', nountype: noun_arb_text, label: "Filiale"}],
@ba3r
ba3r / gist:180214
Created September 3, 2009 09:42
piratebay doesnt work
//function to transform link
function processNode() {
var href = jQuery(this).attr("href");
if(/[a-z]\:\/\//.exec(href) === null) {
if(href[0] == "/")
jQuery(this).attr("href", "http://thepiratebay.org" + href);
}
}
@ba3r
ba3r / imdbpreview.js
Created September 3, 2009 04:09 — forked from amau96/imdb-preview
imdbpreview
//function to transform link
function processNode() {
var href = jQuery(this).attr("href");
if(/[a-z]\:\/\//.exec(href) === null) {
if(href[0] == "/")
jQuery(this).attr("href", "http://www.imdb.com" + href);
}
}
@ba3r
ba3r / releaseversion.js
Created August 20, 2009 10:52
ubiquity google maps directions
//version 1.41b - Search for a route with Google Maps (supports many languages)
var from_prepos;
var to_prepos;
var geo = CmdUtils.getGeoLocation().country;
//German
if ( geo == 'Germany' || geo == 'Austria' || geo == 'Switzerland' )
{from_prepos = "von"; to_prepos = "nach";} else {
//Japanese
if ( geo == 'Japan' )
@ba3r
ba3r / gist:170941
Created August 20, 2009 09:53
songza song artist album search
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>Songza Search</title>
</head>
<body>
<div id="ubiquity-preview" style="display: none;">
<style>
.gresult img {