com web/php: Make the search results page friendlier to users without JS.: include/prepend.inc

From: Date: Thu, 21 Nov 2013 01:17:23 +0000
Subject: com web/php: Make the search results page friendlier to users without JS.: include/prepend.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22510@lists.php.net to get a copy of this message
Commit: 6fac5f57a8a85b7ea81c3f7889789fc532ec1112 Author: Adam Harvey <aharvey@php.net> Wed, 20 Nov 2013 17:17:23 -0800 Parents: bcecfee3f0c3a0ebafed7f58882575d5156a6650 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=6fac5f57a8a85b7ea81c3f7889789fc532ec1112 Log: Make the search results page friendlier to users without JS. Fixes bug #66133 (Search silently brokes is Javascript is not enabled). Bugs: https://bugs.php.net/66133 Changed paths: M include/prepend.inc Diff: diff --git a/include/prepend.inc b/include/prepend.inc index e10f5a5..80b09bb 100644 --- a/include/prepend.inc +++ b/include/prepend.inc @@ -159,9 +159,14 @@ function myphpnet_save() // TODO: Possible $default escaping issues function google_cse($default = '', $lang = 'en') { ?> -<div id="cse" style="width: 100%;">Loading</div> +<noscript> + php.net's search functionality requires JavaScript to operate. Please enable + JavaScript and reload to continue. +</noscript> +<div id="cse" style="width: 100%;"></div> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> + document.getElementById("cse").innerHTML = "Loading..."; google.load('search', '1', {language : '<?php echo $lang; ?>', style : google.loader.themes.MINIMALIST}); google.setOnLoadCallback(function() { var customSearchOptions = {};

« previous php.webmaster (#22510) next »