MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 767: Line 767:
      
      
     // Define the new form HTML as a string
     // Define the new form HTML as a string
    var newFormHtml = '<form action="/index.php" id="searchform">' +
var newFormHtml = '<form action="/index.php" id="searchform">' +
        '<div id="simpleSearch" class="right-inner-addon">' +
    '<div id="simpleSearchSpecial" class="right-inner-addon">' +
        '<span>[ Search ]</span>' +
    '<span>[ Search ]</span>' +
        '<input class="form-control" name="search" placeholder="" title="Search [alt-shift-f]" accesskey="f" id="searchInput" tabindex="1" autocomplete="off" type="search">' +
    '<input class="form-control" name="search" placeholder="" title="Search [alt-shift-f]" accesskey="f" id="searchInput" tabindex="1" autocomplete="off" type="search">' +
        '<span class="closing-bracket">]</span>' +
    '<span class="closing-bracket">]</span>' +
        '<input value="Special:Search" name="title" type="hidden">' +
    '<input value="Special:Search" name="title" type="hidden">' +
        '</div>' +
    '</div>' +
        '</form>';
    '</form>';
 
    // Replace the div with id="searchText" with the new form
// Replace the div with id="searchText" with the new form
    $('#searchText').replaceWith(newFormHtml);
$('#searchText').replaceWith(newFormHtml);
      
      
     // Target the button based on its complex class structure
     // Target the button based on its complex class structure
     $(".oo-ui-actionFieldLayout-button .oo-ui-buttonInputWidget").remove();
     $(".oo-ui-actionFieldLayout-button .oo-ui-buttonInputWidget").remove();
});
});

Navigation menu