From cda00bcc1ae27d42ee4e504c4022d83f371fa22c Mon Sep 17 00:00:00 2001 From: kotarf Date: Sat, 18 May 2013 12:45:32 -0400 Subject: [PATCH] Bug #15 alchemy returns blank score --- README.md | 1 + bookmarksorter.js | 21 +++++++++++---------- manifest.json | 2 +- popup.html | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c3ec088..6936ed8 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,4 @@ Version history: "0.0.1.0", Check if sorting is in progress before attaching create listener in enable auto sort "0.0.1.1", Imports will temporarily disable automatic sort, visit sort will not move if bookmarking is in progress, clear all interval alarms because duplicates were noticed on Chromium "0.0.1.2", New logo, promo images. Switched to MIT license. +"0.0.1.3", Bug #15 \ No newline at end of file diff --git a/bookmarksorter.js b/bookmarksorter.js index d15320f..9c55f5c 100644 --- a/bookmarksorter.js +++ b/bookmarksorter.js @@ -434,13 +434,14 @@ // If not, make an API request. me.alchemyCategory(url, function(data, textStatus, jqXHR) { - var category = data.category; - var title = undefined; - var status = data.status; - var statusInfo = data.statusInfo; + var category = data.category, + title = undefined, + status = data.status, + statusInfo = data.statusInfo, + score = data.score; // Check the status first - if (status === me.config.okStatus) { + if (status === me.config.okStatus && score && category) { // If the score of the result is horrible, redo the whole thing using the baseUrl (if not already using it) var score = data.score; @@ -516,13 +517,13 @@ console.log("Making a TITLE request for - ", url); me.alchemyTitle(baseUrl, function(data, textStatus, jqXHR) { - var title = data.title; - var category = undefined; - var status = data.status; - var statusInfo = data.statusInfo; + var title = data.title, + category = undefined, + status = data.status, + statusInfo = data.statusInfo; // Check the status first - if (status === me.config.okStatus) { + if (status === me.config.okStatus && title) { // Cache the title me.cacheTitle(cachedData, baseUrl, title); diff --git a/manifest.json b/manifest.json index d919f41..2dafcbc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Smart Bookmark Sorter", - "version": "0.0.1.2", + "version": "0.0.1.3", "manifest_version": 2, "description": "Sort bookmarks based on their title, category and frequency of use", "icons": { "128": "images/logo_128x128.png", "48" : "images/logo_48x48.png", "16" : "images/logo_16x16.png"}, diff --git a/popup.html b/popup.html index 72ea58f..8ab18c6 100644 --- a/popup.html +++ b/popup.html @@ -88,7 +88,7 @@

API Key

-

Version 0.0.1.1

+

Version 0.0.1.3

Powered by

AlchemyAPI Logo JQuery UI Logo