ankit / stylebot

Change the appearance of the web instantly
https://stylebot.dev/
MIT License
1.39k stars 206 forks source link

Not able to import previously exported styles #646

Open H4x0r5 opened 3 years ago

H4x0r5 commented 3 years ago

Describe the bug

Cannot import old export file. Previously saved as ".txt", incompatible with new v3.1 "JSON" format. Previous version 3.0.7 export function prompted to "copy" text. Import option prompted to "paste" text.

New version, 3.1, Export downloads ".json" file, and Import prompts to select said ".json" file. This does not work, if you're importing previously copied text that was just saved wherever, such as in a text file. See screenshots.

Browser

Version 90.0.4430.212 (Official Build) (64-bit) Windows 10 Enterprise 20H2

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Styles import and work immediately on their respective websites.

Screenshots

This is the OLD Export function (v.3.0.7): 2021-05-12 10_33_25-Stylebot Options Here there was no "JSON" file download, it would just ask you to copy the text into a JSON file, of course I never did this and just pasted it into a TXT file, because for one It was easier and couldn't be bothered to find out how to save/convert to JSON.

This is the OLD Import function (v3.0.7): 2021-05-12 10_26_55-Stylebot Options Here I could paste the old exported text, which i normally just kept in a text file with no issues.

Here is the NEW import function (v3.1): 2021-05-12 10_29_16-Stylebot Options This no longer has the "Paste previously exported JSON". As such, when I try to copy my previously exported "copy and paste" CSS settings, I get the "JSON format" error.

Here is also the NEW Export function (v3.1): 2021-05-12 10_37_38-Window Once you press Export, it downloads the JSON file. Hopefully you can see here how it is different than the old version, where it just gave you text to copy.

Additional context

Nevertheless, I understand I can probably fix this myself by downloading the old version and Importing the text or getting a hold of my old device and updating it then exporting the file again as JSON. The point is, it's already been done, I've already exported previously as an old version, the new version should not break this functionality or make this more difficult. (If the end goal is to make this simpler to use).

Before you ask, I have just tried removing the ".txt" extension from the file and leaving blank or changing to ".json", (yes, I know this is not how file conversion works...), regardless, it said the "Import was successful", and of course, failed to show any of the imported styles, remaining blank. However, this is a separate issue I guess, to do with whether or not it was able to read and import the file successfully. Not too bothered about this one but just thought you should know.

thescarymed commented 3 years ago

Is there any way to fix this? I've lost the old version and I only have the text file as backup now.