Update TGBeta.ps1
This commit is contained in:
75
TGBeta.ps1
75
TGBeta.ps1
@@ -957,12 +957,79 @@ function GetHtmlContent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function triggerTweaks() {
|
function triggerTweaks() {
|
||||||
const setedgedefaultsearch = document.querySelector('input[name="setedgedefaultsearch"]');
|
// 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;
|
||||||
|
|
||||||
|
// Get the selected radio button for Windows Performance Optimization
|
||||||
if (setedgedefaultsearch.checked) {
|
let optimizeWindowsPerformanceLevel = "none";
|
||||||
fetch('/setedgedefaultsearch', { method: 'GET' })
|
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