mirror of
https://github.com/php/php-src.git
synced 2024-12-13 03:44:17 +08:00
Nicer (JSLint-compliant!) credits reveal JavaScript
This commit is contained in:
parent
ee6540ad09
commit
c7c2fb0158
@ -800,13 +800,18 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
|
||||
if ((flag & PHP_INFO_CREDITS) && !sapi_module.phpinfo_as_text) {
|
||||
php_info_print_hr();
|
||||
php_info_print("<script>(function () {\n");
|
||||
php_info_print("'use strict';\n");
|
||||
php_info_print(" 'use strict';\n");
|
||||
php_info_print(" window.onload = function () {\n");
|
||||
php_info_print(" document.getElementById('credits').style.display = 'none';\n");
|
||||
php_info_print(" document.getElementById('revealcredits').style.display = 'block';\n");
|
||||
php_info_print(" document.getElementById('revealcredits').onclick = function () {\n");
|
||||
php_info_print(" document.getElementById('credits').style.display = 'block';\n");
|
||||
php_info_print(" document.getElementById('revealcredits').style.display = 'none';\n");
|
||||
php_info_print(" var credits, reveal;\n");
|
||||
php_info_print("\n");
|
||||
php_info_print(" credits = document.getElementById('credits');\n");
|
||||
php_info_print(" reveal = document.getElementById('revealcredits');\n");
|
||||
php_info_print("\n");
|
||||
php_info_print(" credits.style.display = 'none';\n");
|
||||
php_info_print(" reveal.style.display = 'block';\n");
|
||||
php_info_print(" reveal.onclick = function () {\n");
|
||||
php_info_print(" credits.style.display = 'block';\n");
|
||||
php_info_print(" reveal.style.display = 'none';\n");
|
||||
php_info_print(" };\n");
|
||||
php_info_print(" };\n");
|
||||
php_info_print("}());</script>\n");
|
||||
|
Loading…
Reference in New Issue
Block a user