mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add dnt for nojs matomo
This commit is contained in:
		
							parent
							
								
									6b34a91587
								
							
						
					
					
						commit
						33cc4bab1f
					
				| @ -139,6 +139,11 @@ function lightOrDark(color) { | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function isDntEnabled(req) { | ||||
|   const dntHeader = req.header('DNT'); | ||||
|   return dntHeader && (dntHeader === '1' || dntHeader === 'true'); | ||||
| } | ||||
| 
 | ||||
| function IsInArray(array, id) { | ||||
|   for (var i = 0; i < array.length; i++) { | ||||
|     if (array[i].id === id) return true; | ||||
| @ -249,10 +254,13 @@ module.exports = function (app, config, renderTemplate) { | ||||
|           var isSchoolProxy = ""; | ||||
|         } | ||||
|          | ||||
|         // unused
 | ||||
|         let badges = ""; | ||||
|         let comments = ""; | ||||
|         let nnn = ""; | ||||
| 
 | ||||
|         const dnt_val = isDntEnabled(req) | ||||
|          | ||||
|         if ( | ||||
|           inv_vid?.error === | ||||
|             "The uploader has not made this video available in your country" || | ||||
| @ -301,6 +309,7 @@ module.exports = function (app, config, renderTemplate) { | ||||
|             discord, | ||||
|             turntomins, | ||||
|             twitch, | ||||
|             dnt_val, | ||||
|             reddit, | ||||
|             channel_uploads, | ||||
|             secure, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley ////
						Ashley ////