speedLimiter #10
@@ -7,7 +7,7 @@ EnableConsole = true
 | 
				
			|||||||
[WatchFolder]
 | 
					[WatchFolder]
 | 
				
			||||||
Path = "/home/joren/dev/DRMDTool/folder"
 | 
					Path = "/home/joren/dev/DRMDTool/folder"
 | 
				
			||||||
PollingInterval = 10
 | 
					PollingInterval = 10
 | 
				
			||||||
UsePolling = true 
 | 
					UsePolling = false 
 | 
				
			||||||
UseInotify = false 
 | 
					UseInotify = false 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[N_m3u8DLRE]
 | 
					[N_m3u8DLRE]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -293,12 +293,15 @@
 | 
				
			|||||||
        document.addEventListener('DOMContentLoaded', function() {
 | 
					        document.addEventListener('DOMContentLoaded', function() {
 | 
				
			||||||
            const currentSpeedLimit = "{{if .GlobalSpeedLimit}}{{.GlobalSpeedLimit}}{{else}}0{{end}}";
 | 
					            const currentSpeedLimit = "{{if .GlobalSpeedLimit}}{{.GlobalSpeedLimit}}{{else}}0{{end}}";
 | 
				
			||||||
            const speedLimitValueInput = document.getElementById('speedLimitValue');
 | 
					            const speedLimitValueInput = document.getElementById('speedLimitValue');
 | 
				
			||||||
 | 
					            const speedLimitUnitSelect = document.getElementById('speedLimitUnit');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Extract numeric value and unit
 | 
					 | 
				
			||||||
            const match = currentSpeedLimit.match(/(\d+(\.\d+)?)([A-Za-z]+)/);
 | 
					            const match = currentSpeedLimit.match(/(\d+(\.\d+)?)([A-Za-z]+)/);
 | 
				
			||||||
            if (match) {
 | 
					            if (match) {
 | 
				
			||||||
                speedLimitValueInput.value = match[1]; // Set the numeric value
 | 
					                speedLimitValueInput.value = match[1];
 | 
				
			||||||
                document.getElementById('speedLimitUnit').value = match[3]; // Set the unit
 | 
					                speedLimitUnitSelect.value = match[3];
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                speedLimitValueInput.value = "0"; 
 | 
				
			||||||
 | 
					                speedLimitUnitSelect.value = "MBps";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user