Plugin Directory

Changeset 406060


Ignore:
Timestamp:
07/07/2011 10:26:57 AM (15 years ago)
Author:
nemooon
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • twitter-profile-widget/trunk/twitter_profile.js

    r406036 r406060  
    66        });
    77        var twitterProfile = function(screen_name) {
    8             this.screen_name = screen_name;
     8            this.profile = $('#TwitterProfile_'+screen_name);
    99            this.ssl = ("https:" == document.location.protocol);
    1010            this.textFormat = function(text) {
     
    2222            };
    2323            this.update = function(data,prefix) {
    24                 this.profile = (data.error == undefined)?$('#TwitterProfile_'+this.screen_name):false;
    25                 if(this.profile) {
     24                console.log(data);
     25                if(data.error == undefined) {
    2626                    var self = this;
    2727                    $.each(data, function(prop,value) {
    2828                        switch(typeof value) {
    2929                            case 'object':
    30                                 if(value) {
     30                                if(prop == 'status' && value) {
    3131                                    self.update(value,prefix+prop+'_');
    3232                                    break;
     
    4949                                        value = self.textFormat(value);
    5050                                    }
    51                                     console.log(prefix+prop,$('.'+prefix+prop,self.profile),value);
    5251                                    $('.'+prefix+prop,self.profile).html(value);
    5352                                }
Note: See TracChangeset for help on using the changeset viewer.