Skip to content

Instantly share code, notes, and snippets.

// max of 140 chars is recommended, but it really allows 160
const IDENTICA_STATUS_MAXLEN = 160;
CmdUtils.CreateCommand({
name: "mozillaca",
icon: "",
takes: {status: noun_arb_text},
modifiers: {},
preview: function(previewBlock, statusText) {
/* TODO
From Abi:
I think the ones I most often use would be to check the current status
of a specific friend (or maybe, the last 3 statuses). The ability to
check your friends timeline as a whole would also be nice.
*/
// max of 140 chars is recommended, but it really allows 160... but that gets truncated on some displays? grr
@gialloporpora
gialloporpora / x
Created March 5, 2009 12:46
Bitly command to short long url
/* Messages used by this command */
var bitly_msg= {
description: "Shorten a long URL using Bit.ly API",
shorturl : "Short URL",
generalerror: "<b>WARNING:</b> Service is not available",
invalidurl: "Invalid Url Format"
}
/* There is a bug in Ubiquity under windows with selection and copy in clipboard of text from preview. For this reason I put the shortened url in clipboard */
@gialloporpora
gialloporpora / x
Created March 5, 2009 11:22
Draft of unread command for MozillaItalia forum
function NounSMFAjax(name, url) {
var noun_ajax_prototype={
_name: name,
_url : url,
_topic_list: null,
_callback: function( unread) {
noun_ajax_prototype._topic_list=unread;
},
getData: function( callback) {
jQuery.get(noun_ajax_prototype._url, function ( data ) {
/* Unfortunatelly the JSON API not show a description of the story, to have it it must to parse the RSS data */
/* I must add the ability to search in localized languages, tomorrow */
CmdUtils.CreateCommand({
name: "bloglines-search",
icon: "http://www.bloglines.com/favicon.ico",
takes: {input : noun_arb_text},
preview: function(pblock, input) {
CmdUtils.previewAjax( pblock, {url: "http://www.bloglines.com/search",
type: "GET",
data: {q : input.text, s : "fr", pop: "l",news:"m", format:"json"},
@gialloporpora
gialloporpora / x
Created February 16, 2009 18:23 — forked from canadaduane/download-files.js
download-file by Duane Johnson
/*
This code is created by Duane Johnson, I have only modified the line 252 to show only the filename (not complete URL) in preview. Encapsulated the files in preview within UL tag
Ubiquity Command: download-files [regexp pattern] to [folder]
Author: Duane Johnson
Email: [email protected]
Description: Downloads files matching the regular expression pattern to a folder.
Changes:
2009-02-15
@gialloporpora
gialloporpora / x
Created February 13, 2009 11:28
MozillaItalia Ubiquity feed
/* I comandi di questo feed sono stati pensati per la navigazione sul forum di MozillaItalia */
/* il codice è stato scritto in modo da poterlo facilmente modificare per altri forum powered by SMF */
/* Il TODO lo metto solo per scrivere qualcosa, non è detto si trasformi in DONE */
/* TODO */
/* permettere l'inserimento di sezioni multiple in cui cercare */
/* Creare dei comandi per le unreadreplies e gli unread con anteprima, cosa che forse è troppo complicata per me :-P */
/* creare comando per salvare i topic e proporli come suggerimento */
var smf_mi_msg={
/* I comandi di questo feed sono stati pensati per la navigazione sul forum di MozillaItalia */
/* il codice è stato scritto in modo da poterlo facilmente modificare per altri forum powered by SMF */
/* Il TODO lo metto solo per scrivere qualcosa, non è detto si trasformi in DONE */
/* TODO */
/* Creare dei comandi per le unreadreplies e gli unread con anteprima, cosa che forse è troppo complicata per me :-P */
/* creare comando per salvare i topic e proporli come suggerimento */
var mi_forum_url="http://forum.mozillaitali a.org/";
var mi_board_dict={"Seamonkey":1,"Firefox":2,"Thunderbird":3,"Annunci":4,"Pianeta Mozilla":5,"Altro":7,"Traduzioni":8,"FAQ":9,"Camino":10,"Sunbird e Lightning":11,"Componenti aggiuntivi":12,"Amministrazione":13,"Kompozer":15,"Siti non funzionanti":16,"Mozilla portabile":17,"Isolamento":18,"Cestino":20,"SUMO":25};
<ul>
<li style="list-style-image: url(data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJUSURBVDiNjZO9S1thGMXPvTfJFbnkipNkLLS0ksFg0M0lf4CboNCEgIIg/RiKtEOn0qGWTtbVoBYcIji10I9J0ApWCjp0kRaXdhHjTW4+uGnur4NJ8GOwZ3nf4TnnfZ5z3scAdBGGYdyVdN+yrGHTNNOtVqsVhuG+pO+S3gE/LtV3BIxzPDJNc8FxHGN0dNRKpVIGoJ2dndr+/r5Vr9cl6bmkN0AoSQIEyHXdj5KYnZ3F932uolKpkM/nK5KQ9FmSCZwLOI7zQBLr6+vXiFdRLBaDtsiTTve3YrFYkM/nbyR3MDU1dSKpLumO+vr6Xruui+d5AFSrVVZWVtjY2KDRaABwdHTE4uIie3t7AJTLZaLRaFXSCyUSid1MJgOA53n09/eTTqdJJpPMzc2xurqKbduMj48Tj8fZ3d0FYHBw8FjSezmOU56fnwdgeXkZ27ap1WpUKhWazSZjY2Nks1kASqVSd4zp6eljSX/MtiHdRDpnEATyfb+bkiSVSqXu3TCM8xgHBga+dkY4OzvDdV2GhoZIJBLMzMxQKBSIRqNkMhlisRhbW1sAJJPJn5I+KB6Pv7poou/7rK2tsbm5SRAEXROXlpY4ODgAoFarYdu2J+llN8ZcLvffMeZyud+SGpLuCVBPT89jSRQKhRvJxWKxISmU9JTOT5Rk9Pb2fpHE5OQkJycn14inp6dMTEx4bdM/SbKAy8sk6WEkElmwLCuSSqUYGRmxgHB7e7t+eHgYazabgaRnkt7SeZnr63xbUtYwjGHTNNNhGP4F9iR9a6/zr4v1/wDE1D9XlC4rrAAAAABJ
@gialloporpora
gialloporpora / x
Created December 20, 2008 01:59
Ubiquity Digg Command
/* I prefere to define the Digg Topic in a variable to avoid to slow command calling the Digg API
* to make this I use a little bookmarklet to make easy this operation. Go to this page to find the complete Digg containers
* http://services.digg.com/containers?appkey=http%3A%2F%2Fapidoc.digg.com */
var digg_dict={ "Apple" : "apple", "Design" : "design", "Gadgets" : "gadgets", "Hardware" : "hardware", "Tech Industry News" : "tech_news", "Linux/Unix" : "linux_unix", "Microsoft" : "microsoft", "Mods" : "mods", "Programming" : "programming", "Security" : "security", "Software" : "software", "Business & Finance" : "business_finance", "World News" : "world_news", "Political News" : "politics", "Political Opinion" : "political_opinion", "US Elections 2008" : "2008_us_elections", "Environment" : "environment", "General Sciences" : "general_sciences", "Space" : "space", "Gaming Industry News" : "gaming_news", "PC Games" : "pc_games", "Playable Web Games" : "playable_web_games", "Nintendo" : "nintendo", "PlayStati