diff options
author | anekos | 2009-10-16 14:48:29 +0000 |
---|---|---|
committer | anekos | 2009-10-16 14:48:29 +0000 |
commit | e31c0f8f17a31c4419dbe151fb437a94d2ccae75 (patch) | |
tree | fc576b5d5ffea7cfe5a3a092e9ce8a49cb4bfaad | |
parent | c44baddf08448d0d5a4ccc81a19b401321ad516e (diff) | |
download | vimperator-plugins-e31c0f8f17a31c4419dbe151fb437a94d2ccae75.tar.bz2 |
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
-rw-r--r-- | reading.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,7 +4,7 @@ * @description update Twitter's status to current URL and comment
* @description-ja 今見てるページの URL とタイトルをコメントといっしょに Twitter に投稿する
* @author janus_wel <janus_wel@fb3.so-net.ne.jp>
- * @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);
|