ABS
ABS copied to clipboard
Manifest version 2 is deprecated
Hi!
Using Chrome, I load unpack the unzip files and pointed to the src folder. But I get an error button next to Details and Remove options of the extension. Please see image:
The error states: "Manifest version 2 is deprecated and support will be removed in 2023." Do you know what could be causing this error?
I do apologize if I am using github incorrectly. This is my first post. Thank you and thank you for your code.
Thats happening in 2023 so we're good for n ow. I've not looked in to how to convert to Manifest 3 yet so hopefully it isn't too difficult to convert the manifest.json file. If I can't though then i'm sure someone will step up to assist when the times due. It will still be possible to run it on older versions of Chrome though if and when that happens until ABS is updated, it'll just be newer versions of Chrome that will need v3 to run ABS.
Oh Ok Thank you again for everything! Have a good night!
Google has an open source project to convert manifests, here: https://github.com/GoogleChromeLabs/extension-manifest-converter
@h4x0rm1k3 I was tinkering with it a bit, and got as far as "it's no longer complaining when you install it" - if you want to check my fork I've merged into master. But the conversion tool dumps almost everything into a single service worker js file (all the background scripts, and all the root-level script files that aren't popup and options. And you have to compile it into a crx (and add some registry changes) to get it to allow blocking webrequests in manifest v3. Something is still broken in the options I think (it doesn't load the default options, nor does it save them properly), but it's a start if you want to continue on with it at some point. I'll probably revisit eventually but this is as far as I got before tapping out, for now.
@wearysky I'll take a look, thanks for letting me know and working on it. If it's as you say then it may be worth trying to set the options manually in the source but obviously that'll be above most peoples heads to do and too much to do individually. There would also be the issue of setting the time if that's also affected for the people like myself who run multiple accounts at different times as I don't think it'd be possible to make them individually as i'm sure when you install 1 version of ABS using the src folder way then you just need to update the src folder next time you update and it does it automatically, again, it'd be a PITA to do that way. If you could point me towards the registry changes you mention i'll take a look at how it works. I did notice it bundled in to a service worker.js file, I believe it was there that I was getting stuck. Maybe there may be another way to update in the future as there's still a year yet before we have to worry and then there may be a work around found out anyway, we shall have to see!
EDIT:- I see the info I asked of you is already in the repo, thanks, i'll take a look and see what happens etc.
@h4x0rm1k3 oh yeah, I forgot to mention that I just dumped my knowledge into the readme because I was too lazy to document it otherwise. Lol.
@wearysky I was just having a quick look (as you do) on Google and found a site on converting v2 to v3 and it mentions about the serviceworker.js breaking certain things like timers because the worker will close and not record/remember what is set or it's supposed to remember so not sure if that's what's breaking but if it is then maybe this might help you? Taken from here - https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/
I will definitely try installing it and seeing how it runs so I can also see what's not working and then at least i'll know what does and doesn't work as it should be and can work from that basis then.
It's common for web developers to perform delayed or periodic operations using the setTimeout or setInterval methods. These APIs can fail in service workers, though, because the scheduler will cancel the timers when the service worker is terminated.
// background.js
// This worked in Manifest V2. const TIMEOUT = 3 * 60 * 1000; // 3 minutes in milliseconds setTimeout(() => { chrome.action.setIcon({ path: getRandomIconPath(), }); }, TIMEOUT);
Instead, we can use the Alarms API. Like other listeners, alarm listeners should be registered in the top level of your script.
// background.js chrome.alarms.create({ delayInMinutes: 3 });
chrome.alarms.onAlarm.addListener(() => { chrome.action.setIcon({ path: getRandomIconPath(), }); });
@h4x0rm1k3 awesome! I'll take a peak when I have the energy to revisit this. Lol.
@h4x0rm1k3 oh and another issue was I had to take out the "buy me a coffee" reference because it was external JS code which is no longer supported. I'm sure there's a workaround for that but I was more concerned about trying to just get it working first :)
I'm still using the last version from the Google Store, at least the Searches work fine, and clicking on cards. I have avoided making changes to the code/repo because it does not have a license, according to Github copyright falls under the name of the original developer and we cant modify the code.
Source: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository#choosing-the-right-license
You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work.