Tor Browser 12.0.3 broke img2tab
Posted: Sun Mar 12, 2023 1:59 pm
The Tor developers changed webextensions.storage.sync.enabled to false by default in Tor Browser 12.0.3 (released February 15, 2023).
This change breaks img2tab.
You can work around this by going to about:config and changing webextensions.storage.sync.enabled to true
Details:
The Tor developers changed webextensions.storage.sync.enabled to false "to eliminate 3 files from the profile folder". They reverted it because it broke the NoScript extensions, but NoScript changed their code to support sync being disabled, so the Tor developers set webextensions.storage.sync.enabled to false again.
The bug in img2tab.js:
Because sync is disabled, the call to browser.storage.sync.get() fails and does not call the callback. globalOptions is left undefined
When the user chooses from the img2tab context menu, this sends a message to the img2tab.js listener which then calls getImages() or getLinkedImages(), which then call processUrls(), which then accesses globalOptions as an object, but globalOptions is undefined. Boom, exception
Browser console logs:
This change breaks img2tab.
You can work around this by going to about:config and changing webextensions.storage.sync.enabled to true
Details:
The Tor developers changed webextensions.storage.sync.enabled to false "to eliminate 3 files from the profile folder". They reverted it because it broke the NoScript extensions, but NoScript changed their code to support sync being disabled, so the Tor developers set webextensions.storage.sync.enabled to false again.
- https://gitlab.torproject.org/tpo/appli ... sues/41424
- https://gitlab.torproject.org/tpo/appli ... sues/41633
- https://gitlab.torproject.org/tpo/appli ... sues/41636
The bug in img2tab.js:
Code: Select all
//Handle options
var globalOptions;
model.storage.sync.get({
tabBackgroundColor: '#000000',
tabForegroundColor: '#FFFFFF',
ignoreThumbs: false,
instagramHighQuality: true,
urlRegexMatch: null,
urlRegexReplace: null
}, function(options) {
globalOptions = options;
});
When the user chooses from the img2tab context menu, this sends a message to the img2tab.js listener which then calls getImages() or getLinkedImages(), which then call processUrls(), which then accesses globalOptions as an object, but globalOptions is undefined. Boom, exception
Browser console logs:
Code: Select all
Unchecked lastError value: Error: globalOptions is undefined [background.js:66]
onExplodeLinkedImagesClick moz-extension://6b1346b6-3947-4396-83a2-2890956adf36/background.js:66
payload is undefined [background.js:157]
urlsToTabbedWindow moz-extension://6b1346b6-3947-4396-83a2-2890956adf36/background.js:157
onExplodeLinkedImagesClick moz-extension://6b1346b6-3947-4396-83a2-2890956adf36/background.js:67