Make exported styles JSON human-readable by indenting

This commit is contained in:
tophf 2017-03-15 03:54:51 +03:00
parent 38006847f7
commit d49622dd27

View File

@ -55,7 +55,7 @@ function generateFileName() {
document.getElementById('file-all-styles').addEventListener('click', function () { document.getElementById('file-all-styles').addEventListener('click', function () {
getStyles({}, function (styles) { getStyles({}, function (styles) {
let text = JSON.stringify(styles); let text = JSON.stringify(styles, null, '\t');
let fileName = generateFileName() || STYLISH_DEFAULT_SAVE_NAME; let fileName = generateFileName() || STYLISH_DEFAULT_SAVE_NAME;
let url = 'data:text/plain;charset=utf-8,' + encodeURIComponent(text); let url = 'data:text/plain;charset=utf-8,' + encodeURIComponent(text);