User talk:Awesome Aasim/customsearch

Latest comment: 2 years ago by Nardog in topic Cannot be recommended

Cannot be recommended edit

The script and the installation code make little sense. It only supports sites that take ?q= and site:, and, more perplexingly, the installation code runs the entire script (i.e. detaching and attaching event handlers) every one second! Just use globals for configurations so you don't have to wait for the script to be loaded (which could be more reliably done with mw.loader.getScript() btw), as in:

window.customsearchEngineURL = 'https://duckduckgo.com/'; // or 'https://duckduckgo.com/?q=%s' if you support more flexibility
window.customsearchEngineName = 'DuckDuckGo';
mw.loader.load("https://en.wikipedia.org/wiki/User:Awesome_Aasim/customsearch.js?action=raw&ctype=text/javascript");

Otherwise I don't think we should be including it in our list. Luckily no one seems to be using it anyway though. Nardog (talk) 23:39, 28 September 2021 (UTC)Reply