Last active
          August 29, 2015 13:57 
        
      - 
      
 - 
        
Save cedmond/9808601 to your computer and use it in GitHub Desktop.  
    Check for facebook posts loaded in a widget, truncate them and add an epllipsis.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var fbCheck = setInterval(function(){ | |
| var fbPosts = $j('li.facebook'); | |
| if( fbPosts.length > 0 ){ | |
| fbPosts.each(function() { | |
| var $this = $j(this); | |
| $this.text( $this.text().slice(0,150) ); | |
| $this.append(' …'); | |
| }); | |
| clearInterval(fbCheck); | |
| } | |
| },100); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment