میڈیا وکی:Gadget-externalsearch.js
نوٹ: بچان مگروں توانوں اپنے براؤزر دے کاشے توں بار جانا پوے گا تبدیلیاں ویکھن لئی۔
- Firefox / Safari: Shift پھڑی رکھو ریلوڈ تے کلکنگ کردیاں ہویاںCtrl-F5 or Ctrl-R (Command-R میک تے)
- گوکل کروم: دباؤ Ctrl-Shift-R (Command-Shift-R میک تے)
Internet Explorer: hold Ctrl کلک کردیاں Refresh, یا دباؤ Ctrl-F5 Konqueror:کلک ریلوڈ یا F5 دباؤ۔ Opera: کاشے نوں صاف کرو آوزار → تانگاں
/** Change Special:Search to use a drop-down menu *******************************************************
*
* Description: Change Special:Search to use a drop-down menu, with the default being
* the internal MediaWiki engine
* Created and maintained by: [[User:Gracenotes]]
*/
function SpecialSearchEnhanced() {
var lang = document.getElementsByTagName("html")[0].getAttribute("lang=ur");
document.documentElement.setAttribute("lang", 'ur');
var createOption = function(site, action, mainQ, addQ, addV) {
var opt = document.createElement('option');
opt.appendChild(document.createTextNode(site));
searchEngines.push([action, mainQ, addQ, addV]);
return opt;
}
if (document.forms.powersearch)
var searchForm = document.forms.powersearch;
if (document.forms.search)
var searchForm = document.forms.search;
if (searchForm.lsearchbox) {
var searchBox = searchForm.lsearchbox;
} else {
var searchBox = searchForm.search;
}
var selectBox = document.createElement('select');
selectBox.id = 'searchEngine';
searchForm.onsubmit = function() {
var optSelected = searchEngines[document.getElementById('searchEngine').selectedIndex];
searchForm.action = optSelected[0];
searchBox.name = optSelected[1];
searchForm.title.value = optSelected[3];
searchForm.title.name = optSelected[2];
}
selectBox.appendChild(createOption('پنجابی ویکیپیڈیا', mw.config.get( 'wgScript' ), 'search', 'title', 'Special:Search'));
selectBox.appendChild(createOption('گوگل', 'http://www.google.com/search', 'q', 'sitesearch', 'pnb.wikipedia.org'));
selectBox.appendChild(createOption('یاہو', 'http://search.yahoo.com/search', 'p', 'vs', 'pnb.wikipedia.org'));
selectBox.appendChild(createOption('بنگ', 'http://www.bing.com/search', 'q', 'q1', 'site:http://pnb.wikipedia.org'));
selectBox.appendChild(createOption('ویکی وکس', 'http://www.wikiwix.com/', 'action', 'lang', 'pnb'));
selectBox.appendChild(createOption('ایگزالیڈ', 'http://www.exalead.com/wikipedia/results', 'q', 'language', 'pnb'));
searchBox.style.marginLeft = '0px';
if (document.getElementById('loadStatus')) {
var lStat = document.getElementById('loadStatus');
} else {
var lStat = searchForm.title;
if( typeof lStat === 'object' && typeof lStat.length === 'number' ) lStat = lStat[0];
}
lStat.parentNode.insertBefore(selectBox, lStat);
}
var searchEngines = [];
// Script is specific to Special:Search
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search'){
$(SpecialSearchEnhanced);
}