mirror of
				https://codeberg.org/claui/mobile-config-firefox.git
				synced 2025-11-04 04:25:55 +00:00 
			
		
		
		
	Use alphabetically sorted filenames regardless of if DB is sorted or not
This commit is contained in:
		
							parent
							
								
									89dfae2f88
								
							
						
					
					
						commit
						8923cc560a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -6,13 +6,14 @@ function initDB(obj){
 | 
				
			||||||
  DB = obj;
 | 
					  DB = obj;
 | 
				
			||||||
  Object.defineProperty(DB,"query",{value:function (q,list){
 | 
					  Object.defineProperty(DB,"query",{value:function (q,list){
 | 
				
			||||||
    let nlist = [];
 | 
					    let nlist = [];
 | 
				
			||||||
    for(let key of list || Object.keys(this)){
 | 
					    for(let key of list || this.keys){
 | 
				
			||||||
      if(this[key].includes(q)){
 | 
					      if(this[key].includes(q)){
 | 
				
			||||||
        nlist.push(key)
 | 
					        nlist.push(key)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return nlist
 | 
					    return nlist
 | 
				
			||||||
  }});
 | 
					  }});
 | 
				
			||||||
 | 
					  Object.defineProperty(DB,"keys",{value:(Object.keys(DB).sort())});
 | 
				
			||||||
  return true
 | 
					  return true
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue