This file contains 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({ | |
name: "regexp", | |
takes: { | |
regexp: noun_arb_text | |
}, | |
modifiers: { | |
with: noun_arb_text | |
}, | |
execute: function(userRegexp, mods) { |
This file contains 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({ | |
name: "regexp", | |
takes: { | |
regexp: noun_arb_text | |
}, | |
modifiers: { | |
with: noun_arb_text | |
}, | |
execute: function(userRegexp, mods) { | |
var text = mods.with.text || ""; |
This file contains 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
--- a/ubiquity/chrome/content/builtincmds.js Sat Sep 13 23:44:07 2008 +0800 | |
+++ b/ubiquity/chrome/content/builtincmds.js Sun Sep 14 01:24:51 2008 -0300 | |
@@ -1299,13 +1299,15 @@ | |
req.open('POST', currentCalendar, false); | |
req.setRequestHeader('Authorization', 'GoogleLogin auth=' + authKey); | |
req.setRequestHeader('Content-type', 'application/atom+xml'); | |
- req.send(quickAddEntry); | |
+ req.send(quickAddEntry); | |
if (req.status == 401) { | |
displayMessage("Please make sure you are logged in to Google Calendar"); |
This file contains 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
var noun_type_time = { | |
_name: "time", | |
default: function(){ | |
var time = Date.parse("now"); | |
var text = time.toString("hh:mm tt") | |
return CmdUtils.makeSugg(text, null, time) | |
}, | |
suggest: function(text, html){ |
This file contains 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
function addToGoogleCalendar(eventString) { | |
var quickAddEntry = "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'>"; | |
quickAddEntry += " <content type=\"html\">" + eventString + "</content>"; | |
quickAddEntry += " <gCal:quickadd value=\"true\"/>"; | |
quickAddEntry += "</entry>"; | |
var authKey = Utils.getCookie(".www.google.com", "CAL"); | |
if (authKey == "") { | |
displayMessage("Please make sure you are logged in to Google Calendar"); |
This file contains 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
const JAIKU_MAXLEN = 140; | |
Jaiku = { | |
addKey:function(key){ | |
if (!Application.prefs.has("jaiku_user_api_key")) { | |
Application.prefs.setValue("jaiku_user_api_key", key); | |
} else { | |
var new_key = Application.prefs.get("jaiku_user_api_key"); | |
new_key.value = key; | |
return new_key.value; |
This file contains 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({ | |
name:"trac", | |
icon: "http://labs.toolness.com/trac/chrome/common/trac.ico", | |
author: "Fernando 'fern' Takai", | |
takes: {'ticket number': noun_arb_text}, | |
preview: function ( pblock, ticket ){ | |
pblock.innerHTML = "Goes to ticket number #" + ticket.text | |
}, | |
execute: function ( ticket ){ | |
var url = "http://labs.toolness.com/trac/ticket/" + ticket.text; |
This file contains 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
Traceback (most recent call last): | |
File "/usr/lib/python2.5/site-packages/Trac-0.11rc1-py2.5.egg/trac/web/api.py", line 339, in send_error | |
'text/html') | |
File "/usr/lib/python2.5/site-packages/Trac-0.11rc1-py2.5.egg/trac/web/chrome.py", line 684, in render_template | |
data = self.populate_data(req, data) | |
File "/usr/lib/python2.5/site-packages/Trac-0.11rc1-py2.5.egg/trac/web/chrome.py", line 592, in populate_data | |
d['chrome'].update(req.chrome) | |
File "/usr/lib/python2.5/site-packages/Trac-0.11rc1-py2.5.egg/trac/web/api.py", line 168, in __getattr__ | |
value = self.callbacks[name](self) | |
File "/usr/lib/python2.5/site-packages/Trac-0.11rc1-py2.5.egg/trac/web/chrome.py", line 460, in prepare_request |
This file contains 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
var noun_type_trac_type = new CmdUtils.NounType( "Trac Type", ['defect', 'enhancement', 'task']) | |
CmdUtils.CreateCommand({ | |
name:"tickets", | |
author: {name:"Fernando 'fern' Takai",email:"[email protected]"}, | |
license:"MPL", | |
icon:"http://labs.toolness.com/trac/chrome/common/trac.ico", | |
takes: {'summary':noun_arb_text}, | |
modifiers: {'keywords':noun_arb_text, 'type':noun_type_trac_type}, | |
description: 'Queries Ubiquity Trac for tickets - w/o parameters, get the last 8 open tickets.', |
This file contains 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
function verifyUnreadEmails(url, callback){ | |
jQuery.get(url, null, function(rss){ | |
var entries = []; | |
var rssEntries = jQuery(rss).find("entry") | |
if(rssEntries.length > 0){ | |
for each(entry in rssEntries){ | |
entries.push(entry); | |
} | |
toslice = rssEntries.length + 1; |
OlderNewer