Difference between revisions of "MediaWiki:Common.js"

From Pirate Party Belgium
Jump to: navigation, search
m
Line 3: Line 3:
 
/* Autocompletion for the <inputbox /> extension */
 
/* Autocompletion for the <inputbox /> extension */
 
document.getElementById('searchform').action = '/index.php';
 
document.getElementById('searchform').action = '/index.php';
var searchInputs = document.getElementsByClassName('searchboxInput');
+
var searchInputs = document.getElementsByName('search');
 
for (var i = 0; i < searchInputs.length; ++i) { searchInputs[i].id = 'searchInput'; }
 
for (var i = 0; i < searchInputs.length; ++i) { searchInputs[i].id = 'searchInput'; }

Revision as of 12:29, 12 March 2017

/* Any JavaScript here will be loaded for all users on every page load. */

/* Autocompletion for the <inputbox /> extension */
document.getElementById('searchform').action = '/index.php';
var searchInputs = document.getElementsByName('search');
for (var i = 0; i < searchInputs.length; ++i) { searchInputs[i].id = 'searchInput'; }