diff options
author | Robin Appelman <icewind1991@gmail.com> | 2010-09-08 18:57:36 +0000 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2010-09-08 20:18:42 +0000 |
commit | af8b66c2c368cee8dbd57591a0daa2566f63af96 (patch) | |
tree | f00a61d72895682df8a2ee7cf8f3ec1adec05082 /js | |
parent | 8ce564ccfe470c3215547893db488ed6d948d867 (diff) | |
download | nextcloud-server-af8b66c2c368cee8dbd57591a0daa2566f63af96.tar.gz nextcloud-server-af8b66c2c368cee8dbd57591a0daa2566f63af96.zip |
the text viewer now does syntax highlighting for code
Diffstat (limited to 'js')
-rw-r--r-- | js/lib_ajax.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/lib_ajax.js b/js/lib_ajax.js index 62899a9cd06..a76460632dd 100644 --- a/js/lib_ajax.js +++ b/js/lib_ajax.js @@ -189,4 +189,13 @@ getTimeString=function(){ months[10]="Nov"; months[11]="Dec"; return date.getDate()+' '+months[date.getMonth()]+' '+date.getFullYear()+' '+date.getHours()+':'+date.getMinutes(); +} + +loadScript=function(url){//dynamicly load javascript files + url=WEBROOT+'/'+url; + var script=document.createElement('script'); + script.setAttribute('type','text/javascript'); + script.setAttribute('src',url); + body=document.getElementsByTagName('body').item(0); + body.appendChild(script); }
\ No newline at end of file |