Changes

60 bytes removed ,  00:27, 31 October 2006
no edit summary
Line 300: Line 300:     
// ==================================================
 
// ==================================================
// Book-wide search using Google
+
// Directory-wide search using Google
// from pl.wikibooks, maintainer [[b:pl:User:Piotr]]
   
// ==================================================
 
// ==================================================
   −
function getBookName() {
+
function getDirectoryName() {
 
   var start = 0;
 
   var start = 0;
 
   var PSEUDONAMESPACE = "Programming:";
 
   var PSEUDONAMESPACE = "Programming:";
Line 314: Line 313:  
   }
 
   }
   −
   var book = wgPageName;
+
   var directory = wgPageName;
 
   if ( i != -1 ) {
 
   if ( i != -1 ) {
     book = wgPageName.slice(0, i);
+
     directory = wgPageName.slice(0, i);
 
   }
 
   }
   return book;
+
   return directory;
 
}
 
}
    
function insertGoogleSearch() {
 
function insertGoogleSearch() {
   if ( wgNamespaceNumber != 0 && wgNamespaceNumber != 102) { // 102 - Cookbook namespace
+
   if ( wgNamespaceNumber != 0) {
 
       return;
 
       return;
 
   }
 
   }
   var google = "http://www.google.com/custom?sa=Google+Search&domains=en.wikibooks.org/wiki/PAGE&sitesearch=en.wikibooks.org/wiki/PAGE";
+
   var google = "http://www.google.com/custom?sa=Google+Search&domains=www.centiare.com/index.php/PAGE&sitesearch=www.centiare.com/index.php/PAGE";
 
   var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
 
   var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
 
   var link = document.createElement('a');
 
   var link = document.createElement('a');
   −
   var book = getBookName();
+
   var book = getDirectoryName();
   −
   link.href = google.replace(/PAGE/g, book);
+
   link.href = google.replace(/PAGE/g, directory);
   link.appendChild(document.createTextNode("Search this book"));
+
   link.appendChild(document.createTextNode("Search the Directory"));
    
   var li = document.createElement('li');
 
   var li = document.createElement('li');
3,699

edits