Update TGBeta.ps1
This commit is contained in:
77
TGBeta.ps1
77
TGBeta.ps1
@@ -956,13 +956,80 @@ function GetHtmlContent {
|
||||
}
|
||||
}
|
||||
|
||||
function triggerTweaks() {
|
||||
const setedgedefaultsearch = document.querySelector('input[name="setedgedefaultsearch"]');
|
||||
function triggerTweaks() {
|
||||
// Get the state of the checkboxes
|
||||
const setEdgeDefaultSearch = document.getElementById('setedgedefaultsearchCheckbox').checked;
|
||||
const optimizeWindowsPerformance = document.getElementById('setWindowsPerformanceCheckbox').checked;
|
||||
const stopUnnecessaryServices = document.getElementById('stopUnnecessaryServicesCheckbox').checked;
|
||||
const disableAnimations = document.getElementById('disableAnimationsCheckbox').checked;
|
||||
const optimizePerformance = document.getElementById('optimizePerformanceCheckbox').checked;
|
||||
const increaseFontSize = document.getElementById('increaseFontSizeCheckbox').checked;
|
||||
const enableDarkMode = document.getElementById('enableDarkModeCheckbox').checked;
|
||||
const clearTempFiles = document.getElementById('clearTempFilesCheckbox').checked;
|
||||
|
||||
|
||||
if (setedgedefaultsearch.checked) {
|
||||
fetch('/setedgedefaultsearch', { method: 'GET' })
|
||||
// Get the selected radio button for Windows Performance Optimization
|
||||
let optimizeWindowsPerformanceLevel = "none";
|
||||
if (optimizeWindowsPerformance) {
|
||||
const radios = document.querySelectorAll('input[name="optimizeWindowsPerformanceLevel"]');
|
||||
radios.forEach(radio => {
|
||||
if (radio.checked) {
|
||||
optimizeWindowsPerformanceLevel = radio.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Log or handle the tweaks (replace console.log with actual logic as needed)
|
||||
console.log("Set Edge Default Search Engine:", setEdgeDefaultSearch);
|
||||
console.log("Optimize Windows Performance:", optimizeWindowsPerformance);
|
||||
console.log("Windows Performance Optimization Level:", optimizeWindowsPerformanceLevel);
|
||||
console.log("Stop Unnecessary Services:", stopUnnecessaryServices);
|
||||
console.log("Disable Animations:", disableAnimations);
|
||||
console.log("Optimize Application Performance:", optimizePerformance);
|
||||
console.log("Increase Font Size:", increaseFontSize);
|
||||
console.log("Enable Dark Mode:", enableDarkMode);
|
||||
console.log("Clear Temporary Files:", clearTempFiles);
|
||||
|
||||
// Example: Apply tweaks (replace these comments with actual implementations)
|
||||
if (setEdgeDefaultSearch) {
|
||||
// Call function or API to set Edge default search engine
|
||||
}
|
||||
|
||||
if (optimizeWindowsPerformance) {
|
||||
if (optimizeWindowsPerformanceLevel === "full") {
|
||||
// Apply full optimization
|
||||
} else if (optimizeWindowsPerformanceLevel === "partial") {
|
||||
// Apply partial optimization
|
||||
} else {
|
||||
// No optimization
|
||||
}
|
||||
}
|
||||
|
||||
if (stopUnnecessaryServices) {
|
||||
// Stop unnecessary services
|
||||
}
|
||||
|
||||
if (disableAnimations) {
|
||||
// Disable animations in the system
|
||||
}
|
||||
|
||||
if (optimizePerformance) {
|
||||
// Optimize application performance
|
||||
}
|
||||
|
||||
if (increaseFontSize) {
|
||||
// Increase font size
|
||||
}
|
||||
|
||||
if (enableDarkMode) {
|
||||
// Enable dark mode
|
||||
}
|
||||
|
||||
if (clearTempFiles) {
|
||||
// Clear temporary files
|
||||
}
|
||||
|
||||
// Notify user tweaks are applied
|
||||
alert("Tweaks applied successfully!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user