Skip to content

Commit c0b9504

Browse files
authored
Merge pull request #6 from sourcemeta/disable-shareability
Do not store JSON documents as URL strings
2 parents 0ac21ee + e7a8e99 commit c0b9504

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

www/app.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,6 @@ function safeJSON (string) {
169169
}
170170

171171
function onAnalyze (value) {
172-
// For shareability purposes
173-
const url = new URL(window.location.href)
174-
url.searchParams.set('json', value)
175-
window.history.replaceState({ value }, '', url.href)
176-
177172
const jsonDocument = safeJSON(value)
178173
if (typeof jsonDocument === 'undefined') {
179174
document.getElementById('json-error').style.display = 'block'
@@ -187,9 +182,4 @@ document.getElementById('analyze').addEventListener('click', () => {
187182
return onAnalyze(code.getValue())
188183
})
189184

190-
const urlValue = new URL(window.location.href).searchParams.get('json')
191-
if (urlValue) {
192-
code.setValue(urlValue)
193-
}
194-
195185
onAnalyze(code.getValue())

0 commit comments

Comments
 (0)