diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index 7e884e7646..93023bc48f 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -713,6 +713,14 @@ Scholar.Item.prototype.removeNote = function(noteID){ return Scholar.DB.query(sql); } +/** +* Returns number of notes in item +**/ +Scholar.Item.prototype.numNotes = function(){ + var sql = "SELECT COUNT(*) FROM itemNotes WHERE itemID=" + this.getID(); + return parseInt(Scholar.DB.valueQuery(sql)); +} + /** * Get the text of an item note **/