Line 57: | Line 57: | ||
function editable(){ | function editable(){ | ||
qs(".JC #content-body").contentEditable = 'true'; | qs(".JC #content-body").contentEditable = 'true'; | ||
− | + | qs(".JC #content-body").oninput = function(){ | |
qs('textarea').value = "<div>" + qs('.JC #content-body').innerHTML+"<\/div><html><script>window.location='/Team:Judd_UK/" + page.replace("*", "/") + "'<\/script><\/html>"; | qs('textarea').value = "<div>" + qs('.JC #content-body').innerHTML+"<\/div><html><script>window.location='/Team:Judd_UK/" + page.replace("*", "/") + "'<\/script><\/html>"; | ||
qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
− | } | + | }; |
var safety = page; | var safety = page; | ||
AJAX('https://2017.igem.org/Team:Judd_UK/Pages/' + safety +'?action=edit', function(e){ | AJAX('https://2017.igem.org/Team:Judd_UK/Pages/' + safety +'?action=edit', function(e){ |
Revision as of 23:51, 28 October 2017