mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	Merge pull request #1934 from dalf/fix_user_agent
User agent: don't include the patch number in the Firefox version
This commit is contained in:
		
						commit
						ee4475ff4b
					
				
					 2 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1,11 +1,6 @@
 | 
			
		|||
{
 | 
			
		||||
    "versions": [
 | 
			
		||||
        "106.0.2",
 | 
			
		||||
        "106.0.1",
 | 
			
		||||
        "106.0",
 | 
			
		||||
        "105.0.3",
 | 
			
		||||
        "105.0.2",
 | 
			
		||||
        "105.0.1",
 | 
			
		||||
        "105.0"
 | 
			
		||||
    ],
 | 
			
		||||
    "os": [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,8 +64,11 @@ def fetch_firefox_last_versions():
 | 
			
		|||
    major_list = (major_last, major_last - 1)
 | 
			
		||||
    for version in versions:
 | 
			
		||||
        major_current = version.version[0]
 | 
			
		||||
        minor_current = version.version[1]
 | 
			
		||||
        if major_current in major_list:
 | 
			
		||||
            result.append(version.vstring)
 | 
			
		||||
            user_agent_version = f'{major_current}.{minor_current}'
 | 
			
		||||
            if user_agent_version not in result:
 | 
			
		||||
                result.append(user_agent_version)
 | 
			
		||||
 | 
			
		||||
    return result
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue