MediaWiki:Common.js: Difference between revisions

From EVERYWHERE wiki
Jump to navigation Jump to search
Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: // Custom script to change the placeholder text of the search bar document.addEventListener('DOMContentLoaded', function() { var searchInput = document.getElementById('searchInput'); if (searchInput) { searchInput.setAttribute('placeholder', 'Search EVERYWHERE wiki'); } });"
 
No edit summary
Line 6: Line 6:
     if (searchInput) {
     if (searchInput) {
         searchInput.setAttribute('placeholder', 'Search EVERYWHERE wiki');
         searchInput.setAttribute('placeholder', 'Search EVERYWHERE wiki');
    }
});
    // Change the placeholder text for Vector Legacy skin search input
    if (vectorLegacySearchInput) {
        vectorLegacySearchInput.setAttribute('placeholder', 'Enter your search query');
     }
     }
});
});

Revision as of 14:59, 5 June 2024

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

// Custom script to change the placeholder text of the search bar
document.addEventListener('DOMContentLoaded', function() {
    var searchInput = document.getElementById('searchInput');
    if (searchInput) {
        searchInput.setAttribute('placeholder', 'Search EVERYWHERE wiki');
    }
});


    // Change the placeholder text for Vector Legacy skin search input
    if (vectorLegacySearchInput) {
        vectorLegacySearchInput.setAttribute('placeholder', 'Enter your search query');
    }
});