SHOW:
|
|
- or go back to the newest paste.
1 | @echo off | |
2 | setlocal | |
3 | ||
4 | rem Set the path to the Firefox profiles directory | |
5 | set "profilesDir=%APPDATA%\Mozilla\Firefox\Profiles" | |
6 | ||
7 | rem Iterate through all folders in the profiles directory | |
8 | for /d %%a in ("%profilesDir%\*") do call :HandleFolder "%%a" | |
9 | ||
10 | pause | |
11 | endlocal | |
12 | goto :eof | |
13 | ||
14 | :HandleFolder | |
15 | rem Store the folder path in a variable | |
16 | set "folder=%1" | |
17 | rem Check if the folder contains a 'user.js' file already | |
18 | - | if not exist "%folder%\user.js" ^( |
18 | + | if not exist "%folder%\user.js" ( |
19 | rem If not, create an empty 'user.js' file | |
20 | type nul > "%folder%\user.js" | |
21 | echo Created user.js in: %folder% | |
22 | ) else ( | |
23 | rem If 'user.js' file already exists, notify the user | |
24 | echo user.js already exists in: %folder% | |
25 | ) | |
26 | - | |
26 | + | |
27 | rem Check and add the required preferences to the user.js file | |
28 | ( | |
29 | - | echo user_pref("dom.webnotifications.enabled", false); |
29 | + | echo user_pref^("dom.webnotifications.enabled", false^); |
30 | - | echo user_pref("dom.webnotifications.serviceworker.enabled", false); |
30 | + | echo user_pref^("dom.webnotifications.serviceworker.enabled", false^); |
31 | - | echo user_pref("dom.pushconnection.enabled", false); |
31 | + | echo user_pref^("dom.pushconnection.enabled", false^); |
32 | - | echo user_pref("dom.push.enabled", false); |
32 | + | echo user_pref^("dom.push.enabled", false^); |
33 | - | echo user_pref("services.sync.prefs.sync.dom.webnotifications.enabled", true); |
33 | + | echo user_pref^("services.sync.prefs.sync.dom.webnotifications.enabled", true^); |
34 | - | echo user_pref("services.sync.prefs.sync.dom.webnotifications.serviceworker.enabled", true); |
34 | + | echo user_pref^("services.sync.prefs.sync.dom.webnotifications.serviceworker.enabled", true^); |
35 | - | echo user_pref("services.sync.prefs.sync.dom.pushconnection.enabled", true); |
35 | + | echo user_pref^("services.sync.prefs.sync.dom.pushconnection.enabled", true^); |
36 | - | echo user_pref("services.sync.prefs.sync.dom.push.enabled", true); |
36 | + | echo user_pref^("services.sync.prefs.sync.dom.push.enabled", true^); |
37 | - | ) >> "%folder%\user.js" |
37 | + | ) >>"%folder%\user.js" |
38 | goto :eof |