Widget:PillIdentifier: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
Line 166: Line 166:
someData=data;
someData=data;
someResults=data.query.results;
someResults=data.query.results;
if(data["query-continue-offset"] > 0){
console.log(countProperties(data.query.results));
if(countProperties(data.query.results) > 0){
$.each(data.query.results, function(ind, val) {
$.each(data.query.results, function(ind, val) {
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
Line 363: Line 364:
}
}
};
};
function countProperties (obj) {
    var count = 0;
    for (var property in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, property)) {
            count++;
      }
    }
    return count;
}
</script>
</script>
<style type="text/css">
<style type="text/css">

Revision as of 02:36, 3 August 2015