com php-src: Nicer (JSLint-compliant!) credits reveal JavaScript: ext/standard/info.c

From: Date: Sun, 15 Jul 2012 13:41:53 +0000
Subject: com php-src: Nicer (JSLint-compliant!) credits reveal JavaScript: ext/standard/info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-69782@lists.php.net to get a copy of this message
Commit: c7c2fb015875979210b801b3e00adef23d3079c2 Author: Andrew Faulds <ajfweb@googlemail.com> Sun, 15 Jul 2012 14:41:53 +0100 Parents: ee6540ad092ce2f2aedb2e677b292b58acdca9be Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c7c2fb015875979210b801b3e00adef23d3079c2 Log: Nicer (JSLint-compliant!) credits reveal JavaScript Changed paths: M ext/standard/info.c Diff: diff --git a/ext/standard/info.c b/ext/standard/info.c index a63fd4c..83126c1 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -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");

« previous php.cvs (#69782) next »