NewsGator 的 Subscription Bookmarklet

If you cannot read chinese, please take a look on the english version of ‘The Subscription Bookmarklet for NewsGator’ below. 🙂

NewsGator提供了快速把 feed 加入 aggregator 中的 Bookmarklet:

Subscription Tools – NewsGator Online

其實內容很簡單:

javascript:location.href=’http://www.newsgator.com/ngs/subscriber/
subext.aspx?url=’+location.href

只要拉到 Firefox 的 link bar 上即可。

不過呢,這個 script 其實有小小的 bug,那就是對 url 並沒有做 encode/escape 處理。

所以一但碰到像無名小站的 rss,URL裡面有 ‘&‘ 的,就準備出鎚吧! (無名的rss url是 http://www.wretch.cc/blog/[user_name]&rss20=1)

怎麼辦呢?

Step 1. 右鍵點選 link bar 上的 bookmarklet (假設已經加上去了),選擇 properties。

Step 2. 修改 Location,把 url='+location.href 改成 url='+escape(location.href),也就是變成:

javascript:location.href=’http://www.newsgator.com/ngs/subscriber/
subext.aspx?url=’+escape(location.href)

或是直接把這個修改過的 Bookmarklet 拉到 linkbar:

Subscribe in NewsGator Online

這樣應該好多了 🙂



The Subscription Bookmarklet for NewsGator

NewsGator provides the Bookmarklet for add the feed into your aggregator quickly:

Subscription Tools – NewsGator Online

The content of the bookmarklet is very simple:

javascript:location.href=’http://www.newsgator.com/ngs/subscriber/
subext.aspx?url=’+location.href

All you need to do is just drag it to the link bar of Firefox .

But, the script actually contains a little bug: it doesn’t encode/escape the url provided. When you encounter some URL such as rss from wretch (a blog service provider in Taiwan), the ‘&‘ character in URL will cause the script to mulfunction. (The url of RSS is http://www.wretch.cc/blog/[user_name]&rss20=1)

To fix the little bug:

Step 1. Right click the bookmarklet on the link bar (If you have add the bookmarklet on your link bar), then choose ‘properties’.

Step 2. Modify ‘Location’ from url='+location.href to url='+escape(location.href) . Then it would be :

javascript:location.href=’http://www.newsgator.com/ngs/subscriber/
subext.aspx?url=’+escape(location.href)

Or you can directly use the modified link as the new bookmarklet:

Subscribe in NewsGator Online

It should function correctly now 🙂

發佈留言