Skip to content

Instantly share code, notes, and snippets.

View ba3r's full-sized avatar

Michael Baer ba3r

View GitHub Profile
@ba3r
ba3r / x
Created August 3, 2009 21:50 — forked from anonymous/x
last.fm radio starter
CmdUtils.CreateCommand({
names: ["radio", "last.fm radio"],
icon: "http://cdn.last.fm/flatness/nice_favicon.png",
homepage: "www.last.fm",
author: {name: "Michael Baer", homepage: "http://twitter.com/synapsos"},
license: "GPL",
description: "Last.FM radio starter - works with 0.5+ (Parser 2)",
help: "Type radio followed by the artist you want to listen to.",
arguments: [{role: 'object', nountype: noun_arb_text, label: "artist name"}],
preview: function(pblock, args) {
@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 {
@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 / 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 / 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);
}
}
/* 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"}],
/* 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) {
//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' )
@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
@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: "you@mozilla.com"},
license: "GPL",
homepage: "http://labs.mozilla.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],