From e31c0f8f17a31c4419dbe151fb437a94d2ccae75 Mon Sep 17 00:00:00 2001 From: anekos Date: Fri, 16 Oct 2009 14:48:29 +0000 Subject: Fix for https URL. pathtraq の URL 正規化が https な URL に対応していないっぽい。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35622 d0d07461-0603-4401-acd4-de1884942a52 --- reading.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'reading.js') diff --git a/reading.js b/reading.js index 785b0c2..39723cc 100644 --- a/reading.js +++ b/reading.js @@ -4,7 +4,7 @@ * @description update Twitter's status to current URL and comment * @description-ja 今見てるページの URL とタイトルをコメントといっしょに Twitter に投稿する * @author janus_wel - * @version 0.23 + * @version 0.24 * @minversion 2.0pre 2008/10/16 * ==/VimperatorPlugin== * @@ -43,6 +43,7 @@ * 2008/09/24 ver. 0.20 - add URL canonicalization. * 2008/10/02 ver. 0.21 - fix the bug not apply encodeURI * to querystring for Pathtraq API. + * 2009/10/16 ver. 0.24 - fix for https URL. * */ (function() { @@ -138,7 +139,8 @@ liberator.modules.commands.addUserCommand(['reading'], "update Twitter's status // complete logic is none. { bang: true, - } + }, + true ); // stuff functions @@ -176,7 +178,7 @@ function canonicalizeURL(url) { req.send(null); if(req.status === 200) { let canonicalized = req.responseText.replace(/^"|"$/g, ''); - return canonicalized ? canonicalized : url; + return (canonicalized && canonicalized != 'undefined') ? canonicalized : url; } else { throw new Error(req.status + ' ' + req.statusText + "\n" + req.responseHeaders); -- cgit v1.2.3