1. Mariusz Kryński
  2. filmaster-api-sample

Commits

mrk  committed a244ace

gender detection, open film links in new window

  • Participants
  • Parent commits cfd1ff8
  • Branches default

Comments (0)

Files changed (1)

File index.html

View file
  • Ignore whitespace
   $("<h3>").append(
     $("<a>").
        attr('href', 'http://filmaster.pl/film/'+film.permalink).
+       attr('target', '_blank').
        text(film.title_localized)
   ).appendTo(item);
   $("<p style='float:left' class='rating'>").text(Math.floor(film.guess_rating*10)/10).
     $('#users').empty();
     $('#results').empty();
     add_user(data);
-    $('#users').append($('<li>').html('<i>and friends he/she follows:</i>'));
+    $('#users').append($('<li>').html('<i>and friends ' + (data.gender=='F' ? 'she' : 'he') +' follows:</i>'));
     $('#results').append($('<li>').html('<i>mark users to see their common movie recommendations...</i>'));
     fetch_collection('/1.0/user/' + username + '/following/?include=user', function(data) {
       $(data).each(function() {