git.samba.org
/
samba-web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04f98d7
)
Hide javascript from old browsers in python generated script.
author
Deryck Hodge
<deryck@samba.org>
Thu, 18 Nov 2004 17:20:32 +0000
(17:20 +0000)
committer
Deryck Hodge
<deryck@samba.org>
Thu, 18 Nov 2004 17:20:32 +0000
(17:20 +0000)
--deryck
git-svn-id: file:///home/svn/samba-web/trunk@427
44aeb9d7
-1cd8-0310-b257-
a505e0beeac2
scripts/js_redirect.py
patch
|
blob
|
history
diff --git
a/scripts/js_redirect.py
b/scripts/js_redirect.py
index c3f51152ae81cf7bf35f0811cb8f3c4b93752e75..b27416ae4662e6317f41047f400d00e91a73125b 100755
(executable)
--- a/
scripts/js_redirect.py
+++ b/
scripts/js_redirect.py
@@
-16,11
+16,13
@@
for line in hosts:
js = open('redirect_include.html', 'w')
js.write('<script language="Javascript" type="text/javascript">\n')
+js.write('<!-- Hide from old browsers\n')
js.write('randomMirror = new Array;\n')
for i in range(len(urls)):
js.write('randomMirror[' + str(i) + '] = ' + urls[i] + '\n')
js.write('\n')
js.write('n = Math.floor(Math.random()*' + str(len(urls)) + ')\n')
+js.write('// end hide -->\n')
js.write('</script>')
js.close()