Created
June 9, 2023 14:59
-
-
Save Zeko369/492f58265b1ceeaffff5eb56dc0ec66a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log( | |
JSON.stringify( | |
Object.fromEntries( | |
[...document.querySelectorAll(".config-vars tr")] | |
.map((row) => [ | |
row.querySelector(".config-var-key").value, | |
row.querySelector(".config-var-value").value, | |
]) | |
.filter((item) => !!item[0] && !!item[1]) | |
), | |
null, | |
2 | |
) | |
.split("\n") | |
.slice(1, -1) | |
.map((row) => row.trim().slice(1).replace('": ', "=")) | |
.map((row) => (row.endsWith(",") ? row.slice(0, -1) : row)) | |
.join("\n") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment