Permalink
Browse files

Improve javascript in welcome page [ci skip]

  • Loading branch information...
1 parent e05a504 commit a46e5ff7935bba842601b50e7873b1eb1a55aa0e @carlosantoniodasilva carlosantoniodasilva committed Jan 6, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 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>

0 comments on commit a46e5ff

Please sign in to comment.