-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.ps1
35 lines (33 loc) · 1.08 KB
/
script.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Write-Output "--------------------"
Write-Output "|EASY JDL ADBLOCKER|"
Write-Output "| @GNUWood 2024 |"
Write-Output "--------------------"
Write-Output ""
$userchoice = Read-Host "Continue?(y/n)"
switch($userchoice)
{
y {
$jsonPath = $env:LOCALAPPDATA + '/JDownloader 2/cfg/org.jdownloader.settings.GraphicalUserInterfaceSettings.json'
try {
$jsonData = Get-Content -Path $jsonPath | ConvertFrom-Json
}
catch {
Write-Error "org.jdownloader.settings.GraphicalUserInterfaceSettings.json Not Exists"
Start-Sleep 3
exit
}
$jsonData.premiumalertetacolumnenabled = $false
$jsonData.premiumalertspeedcolumnenabled = $false
$jsonData.premiumalertetacolumnenabled = $false
$jsonData.specialdealoboomdialogvisibleonstartup = $false
$jsonData.specialdealsenabled = $false
$jsonData.donatebuttonstate = "CUSTOM_HIDDEN"
$jsonData.bannerenabled = $false
$jsonString = $jsondata | ConvertTo-Json
$jsonString | Set-Content -Path $jsonPath
Write-Output "ADBlocking Done."
Start-Sleep 3
}
n {exit}
default {Write-Output ("invalid argument. The answer must be y or n.")}
}