The installed extensions from rpi-firefox-mods can be found here: /usr/lib/firefox/distribution/extensions
You can see the installed files from any package with this command:In that folder, there are 3 .xpi files, including one named uanaughtylist@raspberrypi.com.xpi
It appears that you can open these .xpi files with XArchiver, and inside I found a ua_naughtylist.js file.
This is the source code for UANaughtyList:
You can see the installed files from any package with this command:
Code:
dpkg -L rpi-firefox-mods
It appears that you can open these .xpi files with XArchiver, and inside I found a ua_naughtylist.js file.
This is the source code for UANaughtyList:
Code:
function youtubeHeaders(details) { const requestHeaders = details.requestHeaders; for (let i = 0; i < requestHeaders.length; i++) { if (requestHeaders[i].name.toLowerCase() === "user-agent") { // It seems to be specifically ARM processor architectures with // Firefox which YouTube thinks can't handle HD. So just replace // the architecture with x64. requestHeaders[i].value = requestHeaders[i].value.replace("aarch64", "x64"); } } return { requestHeaders: requestHeaders };}function netflixHeaders(details) { const requestHeaders = details.requestHeaders; for (let i = 0; i < requestHeaders.length; i++) { if (requestHeaders[i].name.toLowerCase() === "user-agent") { // Netflix gives an error in Firefox, so just pretend to be Chrome // on ChromeOS. requestHeaders[i].value = "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"; } } return { requestHeaders: requestHeaders };}chrome.webRequest.onBeforeSendHeaders.addListener(youtubeHeaders, {'urls': ['*://www.youtube.com/*']}, ['blocking', 'requestHeaders']);chrome.webRequest.onBeforeSendHeaders.addListener(netflixHeaders, {'urls': ['*://netflix.com/*', '*://*.netflix.com/*']}, ['blocking', 'requestHeaders']);
Statistics: Posted by Botspot — Tue Feb 20, 2024 7:17 am