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>
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue