From f60bebdcc2382030485ab743473e76933a0d70c6 Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Tue, 7 Sep 2021 16:46:47 +0800 Subject: [PATCH] rebuilding site Tue Sep 7 04:46:46 PM CST 2021 --- searchurl/ace.js | 16 +++++++--------- searchurl/ace_t.html | 7 ++++--- searchurl/txt/cmds.cfg | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/searchurl/ace.js b/searchurl/ace.js index e07bf4a..2c121a4 100644 --- a/searchurl/ace.js +++ b/searchurl/ace.js @@ -1,20 +1,18 @@ var editor; onload=function(){ - var e = document.getElementById("editor"); + var d=document; var ext = location.href.split('.').pop(); - outer:{ + { + var ta=d.getElementById("textarea"); + var text=ta.innerHTML; + var e = d.getElementById("editor"); + switch(ext){ - case "html": - { - var text = e.innerHTML; - editor = ace.edit(e); - editor.session.setValue(text); - } - break outer; case "js": ext = "javascript"; } editor = ace.edit(e); + editor.session.setValue(text); } editor.session.setMode("ace/mode/"+ext); editor.setTheme("ace/theme/clouds"); diff --git a/searchurl/ace_t.html b/searchurl/ace_t.html index ad19d11..e5384d2 100644 --- a/searchurl/ace_t.html +++ b/searchurl/ace_t.html @@ -6,10 +6,11 @@ bottom: 0; left: 0; } + #textarea{display:none} +

 
-
-

title

-
hi
+