diff options
-rw-r--r-- | direct_bookmark.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/direct_bookmark.js b/direct_bookmark.js index 05e955a..df4f1ab 100644 --- a/direct_bookmark.js +++ b/direct_bookmark.js @@ -297,14 +297,8 @@ for Migemo search: require XUL/Migemo Extension //
function getNormalizedPermalink(url){
- var xhr = new XMLHttpRequest();
- xhr.open("GET","http://api.pathtraq.com/normalize_url?url=" + url,false);
- xhr.send(null);
- if(xhr.status != 200){
- liberator.echoerr("Pathtraq: FAILED to normalize URL!!");
- return undefined;
- }
- return xhr.responseText;
+ var canonical = plugins.libly.$U.getFirstNodeFromXPath('//link[@rel="canonical"]').href;
+ return canonical ? canonical : url;
}
function getUserAccount(form,post,arg){
|