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:
parent
e05a504acb
commit
a46e5ff793
1 changed files with 5 additions and 4 deletions
|
@ -173,17 +173,18 @@
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function about() {
|
function about() {
|
||||||
var info = document.getElementById('about-content');
|
var info = document.getElementById('about-content'),
|
||||||
|
xhr;
|
||||||
|
|
||||||
if (info.innerHTML == '') {
|
if (info.innerHTML === '') {
|
||||||
var xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "rails/info/properties", false);
|
xhr.open("GET", "rails/info/properties", false);
|
||||||
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
||||||
xhr.send("");
|
xhr.send("");
|
||||||
info.innerHTML = xhr.responseText;
|
info.innerHTML = xhr.responseText;
|
||||||
}
|
}
|
||||||
|
|
||||||
info.style.display = info.style.display == 'none' ? 'block' : 'none';
|
info.style.display = info.style.display === 'none' ? 'block' : 'none';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue