A script to change Pale Moon’s user-agent to the latest version of Firefox.

word=$(curl -fI 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' | grep -o 'firefox-[0-9.]\+[0-9]' | awk -v RS='\r' '{print substr($0,9,2)}')
echo $word
sed -i "s|user_pref(\"network.http.useragent.global_override\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:[0-9][0-9].0) Gecko/20100101 Firefox/[0-9][0-9].0\");|user_pref(\"network.http.useragent.global_override\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:${word}.0) Gecko/20100101 Firefox/${word}.0\");|" user.js

Leave a Reply

Your email address will not be published. Required fields are marked *