Skip to content

Instantly share code, notes, and snippets.

chrome/content/about.js 118
for (name in info.commands)
chrome/content/popupmenu.js 67
for (i in results) {
chrome/content/report-bug.js 106
for (name in info)
chrome/content/skinlist.js 50
@satyr
satyr / shorten-url.ubiq.js
Created April 6, 2009 10:57
Shortens a URL by the service of your choice.
const Name = 'shorten-url',
Shorteners = [{
text: 'tinyurl.com',
data: function(lu, cb)({
url: 'http://tinyurl.com/api-create.php',
type: 'post',
data: {url: lu},
success: cb,
}),
logo: <h1 style={(
@satyr
satyr / gcalendar.ubiq.js
Created April 5, 2009 04:17
check-calendar++
const Name = 'gcalendar',
GCal = 'http://www.google.com/calendar/',
Logo = ''+<a href={GCal}><img width="150" height="34"
style="background-color:#eee; border:none; margin-top:4px" accesskey="l"
src={GCal +'images/blue_beta_en.gif'}/></a>,
QA = <a
href="http://www.google.com/support/calendar/bin/answer.py?answer=36604"
>Quick Add</a>,
Icon = 'chrome://ubiquity/skin/icons/calendar.png';
@satyr
satyr / wunderground.ubiq.js
Created April 4, 2009 22:44
Weather Underground
prexml();
const
Name = 'wunderground',
WU = 'http://www.wunderground.com/',
WUAPI = 'http://api.wunderground.com/auto/wui/geo/',
Base = '<style>'+ <![CDATA[
dl, ol {margin:0 0 1em; padding:0}
ol {list-style:none}
dd {margin:0.4em 0 0.8em; min-height:50px}
dd img {float:left; padding-right:0.4em}
@satyr
satyr / accesskeys.ubiq.js
Created April 3, 2009 18:51
Shows accesskey-ed elements on the current page.
CmdUtils.CreateCommand({
name: 'accesskeys',
description: 'Shows accesskey-ed elements on the current page.',
author: 'satyr', license: 'X',
icon: 'chrome://ubiquity/skin/icons/text_underline.png',
execute: function(){},
preview: function(pb){
var {top} = context.focusedWindow
if(top.document.contentType == 'application/vnd.mozilla.xul+xml')
return void this.previewDefault(pb)
@satyr
satyr / hit@hint_sidebar.js
Created April 2, 2009 10:44
yet another Hit-a-Hint / use keyconfig for better performances
var sbw = (document.getElementById('sidebar').contentDocument
.getElementById('web-panels-browser').contentWindow);
var sbt = document.getElementById('sidebar-title');
document.getElementById('xxx_key__hit@hint').oncommand({hah: {
window: sbw,
sign: {
run: function(){ this._ = sbt.value },
put: function(msg){ sbt.value = msg },
end: function(){
sbt.value = this._;
@satyr
satyr / link-to-wikipedia.624.ubiq.js
Created March 28, 2009 18:28
link-to-wikipedia++
@satyr
satyr / x
Created March 27, 2009 17:06
#ubiquity-preview
#ubiquity-preview
diff -r 19db7607664b ubiquity/feed-parts/header/cmdutils.js
--- a/ubiquity/feed-parts/header/cmdutils.js Wed Mar 25 07:20:16 2009 +0900
+++ b/ubiquity/feed-parts/header/cmdutils.js Wed Mar 25 07:41:04 2009 +0900
@@ -943,6 +943,11 @@
data,
callback,
type) {
+ if (typeof data === 'function') {
+ callback = data;
+ data = null;
diff -r 19db7607664b ubiquity/feed-parts/header/cmdutils.js
--- a/ubiquity/feed-parts/header/cmdutils.js Wed Mar 25 07:20:16 2009 +0900
+++ b/ubiquity/feed-parts/header/cmdutils.js Wed Mar 25 07:20:42 2009 +0900
@@ -1345,7 +1345,7 @@
searchParser, options.parser.type || "html");
}
else {
- CmdUtils.previewGet(pblock, urlString, searchParser,
+ CmdUtils.previewGet(pblock, urlString, null, searchParser,
options.parser.type || "html");