qutebrowser: fix dark theme on stackexchange
This commit is contained in:
		
							parent
							
								
									80d814c9bf
								
							
						
					
					
						commit
						8fb69e15fe
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -162,7 +162,7 @@ in
 | 
				
			||||||
        bg = color.bg;
 | 
					        bg = color.bg;
 | 
				
			||||||
        preferred_color_scheme = "dark";
 | 
					        preferred_color_scheme = "dark";
 | 
				
			||||||
        darkmode = {
 | 
					        darkmode = {
 | 
				
			||||||
          enabled = false;
 | 
					          enabled = true;
 | 
				
			||||||
          threshold = {
 | 
					          threshold = {
 | 
				
			||||||
            text = 150;
 | 
					            text = 150;
 | 
				
			||||||
            background = 205;
 | 
					            background = 205;
 | 
				
			||||||
| 
						 | 
					@ -189,8 +189,18 @@ in
 | 
				
			||||||
      // @noframes
 | 
					      // @noframes
 | 
				
			||||||
      // ==/UserScript==
 | 
					      // ==/UserScript==
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      DarkReader.setFetchMethod(window.fetch)
 | 
					      const ignore_list = [
 | 
				
			||||||
 | 
					        "stackexchange.com",
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      for (let item of ignore_list) {
 | 
				
			||||||
 | 
					          if (window.location.origin.contains(item)) {
 | 
				
			||||||
 | 
					              console.log("URL matched dark-mode ignore list");
 | 
				
			||||||
 | 
					              return;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      DarkReader.setFetchMethod(window.fetch)
 | 
				
			||||||
      DarkReader.enable({
 | 
					      DarkReader.enable({
 | 
				
			||||||
      	brightness: 100,
 | 
					      	brightness: 100,
 | 
				
			||||||
      	contrast: 100,
 | 
					      	contrast: 100,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue