This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.makeSearchCommand({ | |
name: "Julian day calc", | |
url: "http://aa.usno.navy.mil/cgi-bin/aa_jdconv.pl", | |
postData: "FFX=2&ID=AA&jd={QUERY}&ZZZ=END", | |
preview: function(pblock, args) { | |
$.post(this.url, | |
this.postData.replace("{QUERY}",args.object.text), | |
function(d) { $(pblock).html(d); }); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 344ae5a3aa11 ubiquity/modules/cmdutils.js | |
--- a/ubiquity/modules/cmdutils.js Wed Oct 21 18:17:42 2009 +0900 | |
+++ b/ubiquity/modules/cmdutils.js Wed Oct 21 13:18:32 2009 +0200 | |
@@ -1167,17 +1167,18 @@ | |
template = "<dl class='list'>"; | |
let max = Math.min(results.length, parser.maxResults || 4); | |
let {baseurl} = parser; | |
- let {escapeHtml, url} = Utils; | |
+ baseurl || (baseurl = url); | |
+ let {escapeHtml, uri} = Utils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.makeSearchCommand({ | |
name: "dict", | |
url: "http://www.dict.cc/?s={QUERY}", | |
parser: { | |
container: "#maincontent table:eq(2) tr:gt(2)", | |
title: "td:nth-child(2)", | |
preview: "td:nth-child(3)" | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["breakSlide"], | |
author: { | |
name: "Christian Sonne", | |
email: "[email protected]", | |
homepage: "http://geeksbynature.dk/", | |
}, | |
license: "GPL", | |
homepage: "http://geeksbynature.dk/", | |
execute: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["bmtest"], | |
preview: function preview(pblock) { | |
pblock.innerHTML = ""; | |
var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"] | |
.getService(Components.interfaces.nsINavHistoryService); | |
var options = historyService.getNewQueryOptions(); | |
var query = historyService.getNewQuery(); | |
var bookmarkService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] | |
.getService(Components.interfaces.nsINavBookmarksService); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["download"], | |
description: "downloads a specified url", | |
help: "download <url>", | |
author: { | |
name: "Christian Sonne", | |
email: "[email protected]", | |
homepage: "http://geeksbynature.dk/", | |
}, | |
license: "GPL", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.makeSearchCommand({ | |
name: "MovieZoo", | |
url: "http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}", | |
parser: { | |
container: "table.nyhedsbrev_tabel2", | |
title: "tr:nth-child(2) tr tr:first-child b", | |
href: function(c) {return jQuery("a.nyhedsbrev",c).attr("href");}, | |
preview: function(c) {var p = ""; jQuery("table table tr:not(:first)",c).each(function(){p += jQuery(this).text()+"<br>";});return p;}, | |
thumbnail: "img.lister_img", | |
maxResults: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is a template command. */ | |
CmdUtils.CreateCommand({ | |
names: ["example"], | |
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}], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: Remember to fill in login credentials - in the future, this will be stored persistently via simple_storage probably... | |
Components.utils.import("resource://jetpack/ubiquity-modules/utils.js"); | |
var TwitterJetpack = { | |
last: 0, | |
queue: [], | |
request: { type: "GET", | |
url: "http://twitter.com/statuses/friends_timeline.json", | |
dataType: "json", | |
error: function() {jetpack.notifications.show({"title":"TwitterJetpack","body":"Error fechting updates"});}, |