Remove trailing variables from image address
This commit is contained in:
		
							parent
							
								
									8f974fba73
								
							
						
					
					
						commit
						9ba6e3f7db
					
				| @ -92,6 +92,7 @@ else if(document.getElementById('tag-sidebar') !== null) { | |||||||
| 	} | 	} | ||||||
| 	fileinfo = fileinfo || document.getElementsByTagName('embed')[0]; //If fileinfo is null then image is most likely flash.
 | 	fileinfo = fileinfo || document.getElementsByTagName('embed')[0]; //If fileinfo is null then image is most likely flash.
 | ||||||
| 	var furl = fileinfo.href || fileinfo.src; | 	var furl = fileinfo.href || fileinfo.src; | ||||||
|  | 	furl = furl.split('?')[0]; // Remove trailing variables, if present.
 | ||||||
| 	var fs = (fileinfo.innerText.match(/[0-9]+ (KB|MB)/) || ["0 KB"])[0].split(" "); | 	var fs = (fileinfo.innerText.match(/[0-9]+ (KB|MB)/) || ["0 KB"])[0].split(" "); | ||||||
| 	var filesize = (fs[1] === "MB" ? fs[0] * 1024 : fs[0]); | 	var filesize = (fs[1] === "MB" ? fs[0] * 1024 : fs[0]); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user