Open barmar opened 7 years ago
Thanks for the heads-up!
I'm not sure that there's a way to do this automagically. It's cross-domain security stuff.
The comments are stored in localStorage, which you can access via the Developer plugin in Firefox (you have to edit the settings in the Developer plugin to show the Storage tab). BUT that doesn't help, because as far as I can tell, you can't see storage data for anything other than the current URL, and given that you can't navigate to the old URL...
So, this is the workaround that I've tested for Firefox (suggestions are welcome for other browsers). With apologies to non-technical people, as it's a bit heavy-going:
select * from webappsstore2 where instr(key, 'AutoReviewComment') == 1
delete from webappsstore2 where instr(key, 'AutoReviewComments') == 1 AND instr(originKey, 'https:443') > 0
BUT you want to be careful NOT to delete comments that you want to keep from other sites. You can adjust the where clauses accordingly (sorry if that's too technical!)update webappsstore2 set
originKey = REPLACE(originKey, 'http:80', 'https:443'),
scope = REPLACE(scope, 'http:80', 'https:443')
where instr(key, 'AutoReviewComments-') == 1
I'm using Chrome on OS X. https://superuser.com/questions/507536/where-does-google-chrome-save-localstorage-from-extensions explains where it stores local storage, I'll try to find this.
Chrome stores local storage in ~/Library/Application Support/Google/Chrome/Default/Local Storage/. Each domain has two files:
http_stackoverflow.com_0.localstorage http_stackoverflow.com_0.localstorage-journal
I renamed all these to https_XXX, and now I've got my auto-comments back!
@barmar, yes that's what I figured too, I'm not sure what the -journal file is. Try it and let us know!
SE has switched all their sites from HTTP to HTTPS (https://stackoverflow.blog/2017/05/22/stack-overflow-flipped-switch-https/?cb=1). None of my saved comments are showing up now. It would be great if you could provide a way to copy all the comments over, or make the URL matching independent of this distinction.
Or just tell me where the comments are saved, I could probably update it by hand easily.