mediawiki.searchSuggest: Remove inline browser compat check
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 17 Dec 2016 01:22:52 +0000 (17:22 -0800)
committerKrinkle <krinklemail@gmail.com>
Sat, 17 Dec 2016 01:29:30 +0000 (01:29 +0000)
Introduced in 1f987fb5eea4.

This is quite dated and obsolete since then. The current code in
the 'mediawiki.searchSuggest' and 'jquery.suggestions' works fine
in all currently supported Grade A browsers (per startup.js).

Change-Id: I6d281459e230fa6a2971a31314f9e963dc83ff2b

resources/Resources.php
resources/src/mediawiki/mediawiki.searchSuggest.js

index d490414..2cb1b86 100644 (file)
@@ -1174,7 +1174,6 @@ return [
                        'searchsuggest-containing',
                ],
                'dependencies' => [
-                       'jquery.client',
                        'jquery.placeholder',
                        'jquery.suggestions',
                        'jquery.getAttrs',
index fa1a78c..ac03911 100644 (file)
@@ -22,7 +22,7 @@
        };
 
        $( function () {
-               var api, map, searchboxesSelectors,
+               var api, searchboxesSelectors,
                        // Region where the suggestions box will appear directly below
                        // (using the same width). Can be a container element or the input
                        // itself, depending on what suits best in the environment.
                        $searchInput = $( '#searchInput' ),
                        previousSearchText = $searchInput.val();
 
-               // Compatibility map
-               map = {
-                       // SimpleSearch is broken in Opera < 9.6
-                       opera: [ [ '>=', 9.6 ] ],
-                       // Older Konquerors are unable to position the suggestions correctly (bug 50805)
-                       konqueror: [ [ '>=', '4.11' ] ],
-                       docomo: false,
-                       blackberry: false,
-                       // Support for iOS 6 or higher. It has not been tested on iOS 5 or lower
-                       ipod: [ [ '>=', 6 ] ],
-                       iphone: [ [ '>=', 6 ] ]
-               };
-
-               if ( !$.client.test( map ) ) {
-                       return;
-               }
-
                // Compute form data for search suggestions functionality.
                function getFormData( context ) {
                        var $form, baseHref, linkParams;