משתמש:Yonidebest/monobook.js/changeSearchLocation.js

הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.

  • פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
  • גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
  • אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
/*
 * pLocation options (The search frame will apear under the following frame):
 * 'ניווט'
 * 'קהילה'
 * 'תיבת כלים'
 *
 * written by [[User:Yonidebest]]
 *
 */

function changeSearchLocation() {
 var pLocation = 'קהילה';

 var pSearch = document.getElementById('p-search');
 var pSearchClone = pSearch.cloneNode(true);
 pSearch.style.display = 'none';
 if (pLocation == 'ניווט') pLocation = 'p-navigation';
 else if (pLocation == 'קהילה') pLocation = 'p-community';
 else if (pLocation == 'תיבת כלים') pLocation = 'p-tb';

 pSearch.parentNode.insertBefore(pSearchClone, document.getElementById(pLocation).nextSibling);
}

$(changeSearchLocation);