diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-06 10:37:22 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-06 10:37:22 -0200 |
commit | a46e5ff7935bba842601b50e7873b1eb1a55aa0e (patch) | |
tree | d1afd19c9d85cdff4a5980dfddbe1eabf3f4fc43 /railties/lib | |
parent | e05a504acb220fb8445afa598c0390606f38a7bf (diff) | |
download | rails-a46e5ff7935bba842601b50e7873b1eb1a55aa0e.tar.gz rails-a46e5ff7935bba842601b50e7873b1eb1a55aa0e.tar.bz2 rails-a46e5ff7935bba842601b50e7873b1eb1a55aa0e.zip |
Improve javascript in welcome page [ci skip]
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/templates/rails/welcome/index.html.erb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/templates/rails/welcome/index.html.erb b/railties/lib/rails/templates/rails/welcome/index.html.erb index 17174e72c0..abe705618a 100644 --- a/railties/lib/rails/templates/rails/welcome/index.html.erb +++ b/railties/lib/rails/templates/rails/welcome/index.html.erb @@ -173,17 +173,18 @@ </style> <script> function about() { - var info = document.getElementById('about-content'); + var info = document.getElementById('about-content'), + xhr; - if (info.innerHTML == '') { - var xhr = new XMLHttpRequest(); + if (info.innerHTML === '') { + xhr = new XMLHttpRequest(); xhr.open("GET", "rails/info/properties", false); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhr.send(""); info.innerHTML = xhr.responseText; } - info.style.display = info.style.display == 'none' ? 'block' : 'none'; + info.style.display = info.style.display === 'none' ? 'block' : 'none'; } </script> </head> |