Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ubiquity google reader tool
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="" xml:lang="en" lang="en"
<title>Ubiquity Google reader tool</title>
<div id="google-reader" style="display: none;">
<small>Now Time: ${now}</small>
<small>Last Update Time: ${time}</small>
<small>Unread items: </small>${count}
{for result in results}
<div class="gresult">
<script class="commands"><![CDATA[
/* Google reader */
names: ["gr"],
icon: "",
description: "Go to google reader.",
help: "Press ge and then enter to the google reader",
author: {name: "Wang Pengcheng", email: ""},
license: "GPL",
homepage: "",
preview: function preview(pblock, args) {
var params = {};
//var url = "";
var url = "";
CmdUtils.previewGet( pblock, url, params, function(data) {
data = data.replace(/<\?[^>]*>/, '');
var results = jQuery("entry",data).get();
var count = results.length;
var numToDisplay = 10;
results = results.splice(0,numToDisplay);
results = {};
var tipsMessage = _("Tip: You can press enter to the google reader.");
var timeFormat = /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/;
var time = (jQuery("updated",data).get(0).innerHTML.replace(timeFormat,"$2 $3,$1 $4:$5:$6"));
pblock.innerHTML = CmdUtils.renderTemplate(
jQuery("#google-reader", feed.dom).html(),
{ results:results,
time:(new Date(time)).toLocaleString(),
now:(new Date()).toLocaleString(),
}, "text");
execute: function execute(args) {
Utils.openUrlInBrowser("", "") ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.