kopia lustrzana https://github.com/cheeaun/phanpy
				
				
				
			Truncate URLs
							rodzic
							
								
									d71b1a7e36
								
							
						
					
					
						commit
						ffabd6188d
					
				|  | @ -9,6 +9,17 @@ function getHTMLText(html) { | |||
|   div.querySelectorAll('br').forEach((br) => { | ||||
|     br.replaceWith('\n'); | ||||
|   }); | ||||
| 
 | ||||
|   // MASTODON-SPECIFIC classes | ||||
|   // Remove .invisible | ||||
|   div.querySelectorAll('.invisible').forEach((el) => { | ||||
|     el.remove(); | ||||
|   }); | ||||
|   // Add … at end of .ellipsis | ||||
|   div.querySelectorAll('.ellipsis').forEach((el) => { | ||||
|     el.append('...'); | ||||
|   }); | ||||
| 
 | ||||
|   return div.innerText.replace(/[\r\n]{3,}/g, '\n\n').trim(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Lim Chee Aun
						Lim Chee Aun