Make exported styles JSON human-readable by indenting
This commit is contained in:
parent
38006847f7
commit
d49622dd27
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user