I\'m trying to save my HTML file in Chrome when the user presses ctrl + s keys but Chrome is crashed.
ctrl + s
(I want to download just the source code of my HTM
In my case, I was going nuts since there wasn't any issues with the string to be decoded, since I could successfully decode it on online tools. Until I found out that you first have to decodeURIComponent what you are decoding, like so:
decodeURIComponent
atob(decodeURIComponent(dataToBeDecoded));