Jump to content

User:Awesome Aasim/customsearch

From Wikipedia, the free encyclopedia
Custom Search
Author(s)Awesome Aasim
UpdatedSeptember 4, 2020
    (4 years ago)
SourceUser:Awesome Aasim/customsearch.js

This allows you to use any search engine to search Wikipedia. Even non-Wikipedia ones.

Note: use of third-party search engines is subject to their terms of use and privacy policies.

Simply type a search term and hit "Enter" or click on the search button. This will take you to a non-Wikipedia webpage.

Installation

[edit]

Add the following code to your Special:MyPage/common.js page:

$(document).ready(function() {
	mw.loader.load("https://en.wikipedia.org/wiki/User:Awesome_Aasim/customsearch.js?action=raw&ctype=text/javascript");
	var interval = window.setInterval(function() {
		window.customsearch(searchEngineURL, searchEngineName);
	}, 1000);
});

replacing searchEngineURL with the URL of the search engine in quotes and searchEngineName with the name of the search engine in quotes.