Improve image detection (#2472)
* Mark every non-https link as 'not image' * Mark xcancel.com links as 'not image'
This commit is contained in:
		
							parent
							
								
									5898f09b34
								
							
						
					
					
						commit
						a95da3d108
					
				@ -31,9 +31,9 @@ const imageUrlMatchers = [
 | 
			
		||||
  u => u.host === 'i.imgur.com'
 | 
			
		||||
]
 | 
			
		||||
const exclude = [
 | 
			
		||||
  u => u.protocol === 'mailto:',
 | 
			
		||||
  u => u.protocol !== 'https:',
 | 
			
		||||
  u => u.host.endsWith('.onion') || u.host.endsWith('.b32.ip') || u.host.endsWith('.loki'),
 | 
			
		||||
  u => ['twitter.com', 'x.com', 'nitter.it', 'nitter.at'].some(h => h === u.host),
 | 
			
		||||
  u => ['twitter.com', 'x.com', 'nitter.it', 'nitter.at', 'xcancel.com'].some(h => h === u.host),
 | 
			
		||||
  u => u.host === 'stacker.news',
 | 
			
		||||
  u => u.host === 'news.ycombinator.com',
 | 
			
		||||
  u => u.host === 'www.youtube.com' || u.host === 'youtu.be',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user