Guest User

Untitled

a guest
Jul 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         get_title: function(anidbid){
  2.             titles[0] = 0;
  3.             titles[1] = 0;
  4.             if(!(anidbid < 1))
  5.             if(anidbvals[anidbid] != undefined){
  6.                 $.each(anidbvals[anidbid-1], function(index, value){
  7.                     if(value['language']== 'en' && value['type'] == 'official'){
  8.                         titles[0] = value['title'];
  9.                     }
  10.                     else if(value['type'] == 'main'){
  11.                         titles[1] = value['title'];
  12.                     }
  13.                 });
  14.                 if(titles[0]== 0){
  15.                     $.each(anidbvals[anidbid-1], function(index, value){
  16.                     if(value['type'] == 'official'){
  17.                         titles[0] = value['title'];
  18.                     }
  19.                 });
  20.                 }
  21.                 return titles;
  22.             }
  23.         }
Add Comment
Please, Sign In to add comment