1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Improve javascript in welcome page [ci skip]

This commit is contained in:
Carlos Antonio da Silva 2013-01-06 10:37:22 -02:00
parent e05a504acb
commit a46e5ff793

View file

@ -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>