joue-quroi / spoof-timezone

A privacy related add-on to spoof the timezone that is returned by your browser
http://add0n.com/spoof-timezone.html
Mozilla Public License 2.0
66 stars 14 forks source link

When cleaning browsing history in Firefox, the settings saved of the extension are cleared also #18

Open aquila-XP opened 4 years ago

aquila-XP commented 4 years ago

Hi Joue Quroi,

Please fix "Spoof Timezone" extension v0.2.3 for Firefox. I use the latest version of Mozilla Firefox (71.0) on Windows 10 Enterprise LTSB with many privacy related add-ons: Ghostery, uBlock Origin, CanvasBlocker, CookieAutodelete, Privacy Possum, Smart Referer, Request Control. By default your extension does nothing, so I check the "Automatically update timezone based on my IP address" and "Pick a random time zone" boxes and then I press the Save button. The problem is that every time I clear the History of Firefox Browser (cookies, cache) manually or with a third party app (like Ccleaner), "Spoof Timezone" loses the saved settings. A few months ago I read that Mozilla development team changed the way extensions permanently store their settings in Firefox. https://www.ghacks.net/2019/02/16/firefox-extensions-to-use-different-storage-type-in-firefox-66/

I'm not a tech savvy but I guess that your extension saves the settings in cookies and not in IndexedDB. Please fix this issue.

aquila-XP commented 4 years ago

Hi Joue Quroi,

Your "Spoof Timezone" add-on for Firefox stores the settings using the "DOM Storage" located in: %AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\webappsstore.sqlite. Usualy "DOM Storage" is cleared by many cleaning utilities like: Ccleaner, BleachBit, Wipe, R-Wipe & Clean etc. by default. Please update the extension so that will store the settings in "Folder Storage" located here: %AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\storage\default\moz-extension+++*

wvxwxvw commented 3 years ago

@aquila-XP The settings are reset even if you clean Firefox normally with the built-in cleaning tool. But the author doesn't seem to care, it doesn't seem like he reads Issues at all. In other words, if you have enabled "cleanup on browser shutdown", then the next time you session, you will receive a non-working addon. And you will think that everything works. Brilliant.

@joue-quroi You can turn off Issues in repositories settings, do it, don't make people waste their time on you.

wvxwxvw commented 3 years ago

Instead Web APIs > Web Storage API you need to use JavaScript API > storage > storage.local

aquila-XP commented 3 years ago

The same issue I encounter in Chromium Browsers. If I clear the Cache in Google Chrome with 'RWipe & Clean' app, "Spoof Timezone" extension loses the settings. Other extensions (like uBlock) don't have this problem.

TimmyBoi155 commented 3 years ago

@wvxwxvw @aquila-XP Hey, I made a version that is always random, instead of wasting time trying to figure out how to do the Indexed DB thing I changed a couple of lines in data/options/index.js If you're unsure about the safety of the code i put in you can unzip the file and take a look through and compare to the source code.

To install:

  1. Open a new tab and type 'about:addons'
  2. Click the little Gear Icon at the top-right and select "Install from File"
  3. Select the zip file i've attached.
  4. If you run private browsing mode, make sure to allow it to run in Private Browsing Mode
  5. Test it on browserleaks.com

If it wont install correctly, you'll have to do this:

  1. in a new tab, go to 'about:config' and get past the warning
  2. set xpinstall.signatures.required to false

If you want me to make one with the "Auto based on my IP Address" always enabled, let me know. I just made this for my personal needs. spoof_timezone_alwaysrandom-0.2.5.zip

wvxwxvw commented 3 years ago

@TimmyBoi155 Thanks, but everything has been done for a long time. The truth is in Russian and the icon for a dark theme. Two options with different servers, ipinfo.io works in https-only-mode. Change_timezone_ru.zip And the button menu is made really useful, and not like here.

TimmyBoi155 commented 3 years ago

@TimmyBoi155 Thanks, but everything has been done for a long time. The truth is in Russian and the icon for a dark theme. Two options with different servers, ipinfo.io works in https-only-mode. Change_timezone_ru.zip And the button menu is made really useful, and not like here.

Hey man, Thank you so much for sharing this. I really appreciate that you took the time to make the local storage working and to make the menus more useful :D

I took your code and translated it to english, for anyone wanting it. And I am using it myself :)

spoof_timezone-2020.10.5_wvxwxvwEdit_toEnglish.zip