+4
-1
lines changedFilter options
+4
-1
lines changed Original file line number Diff line number Diff line change
@@ -191,10 +191,13 @@ export default class TemplateRenderer {
191
191
contextKey = 'state',
192
192
windowKey = '__INITIAL_STATE__'
193
193
} = options || {}
194
+
const autoRemove = process.env.NODE_ENV === 'production'
195
+
? '(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'
196
+
: ''
194
197
return context[contextKey]
195
198
? `<script>window.${windowKey}=${
196
199
serialize(context[contextKey], { isJSON: true })
197
-
}</script>`
200
+
}${autoRemove}</script>`
198
201
: ''
199
202
}
200
203
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4