Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal
- rem Set the path to the Firefox profiles directory
- set "profilesDir=%APPDATA%\Mozilla\Firefox\Profiles"
- rem Iterate through all folders in the profiles directory
- for /d %%a in ("%profilesDir%\*") do call :HandleFolder "%%a"
- pause
- endlocal
- goto :eof
- :HandleFolder
- rem Store the folder path in a variable
- set "folder=%1"
- rem Check if the folder contains a 'user.js' file already
- if not exist "%folder%\user.js" (
- rem If not, create an empty 'user.js' file
- type nul > "%folder%\user.js"
- echo Created user.js in: %folder%
- ) else (
- rem If 'user.js' file already exists, notify the user
- echo user.js already exists in: %folder%
- )
- rem Check and add the required preferences to the user.js file
- (
- echo user_pref^("dom.webnotifications.enabled", false^);
- echo user_pref^("dom.webnotifications.serviceworker.enabled", false^);
- echo user_pref^("dom.pushconnection.enabled", false^);
- echo user_pref^("dom.push.enabled", false^);
- echo user_pref^("services.sync.prefs.sync.dom.webnotifications.enabled", true^);
- echo user_pref^("services.sync.prefs.sync.dom.webnotifications.serviceworker.enabled", true^);
- echo user_pref^("services.sync.prefs.sync.dom.pushconnection.enabled", true^);
- echo user_pref^("services.sync.prefs.sync.dom.push.enabled", true^);
- ) >>"%folder%\user.js"
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement