Add ability to disable user code on page load

Adding `run=disabled` to the uri will disable the
page from running user code.

This is useful for pages that have frozen to to infinite loops
or untrusted links that may be malicious
This commit is contained in:
Berkeley Martinez
2015-12-03 14:07:39 -08:00
parent 09e8be03e3
commit 81028fceac
2 changed files with 33 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ window.common = (function(global) {
preview.write(
libraryIncludes +
jQuery +
code +
(common.codeUri.shouldRun() ? code : '' ) +
'<!-- -->' +
iframeScript
);