KongSearch *OLD*

Links Kong search to Google

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name           KongSearch *OLD*
// @namespace      Kongregate
// @description    Links Kong search to Google
// @version        1.0
// @include        http://kongregate.com/*
// @include        http://www.kongregate.com/*
// ==/UserScript==
(function(){
window.addEventListener('load', function(event) {
   Element=unsafeWindow['Element'];
   
   var div = document.getElementById('search');
   div.style.width='310px';
   
   var a=Element.extend(document.createElement('input'));
   a.type='submit';
   a.value='Google';
   a.innerHTML='Google';
   a.style.backgroundColor='#F0F0F0';
   a.style.borderColor='#F2F2F2 rgb(132, 132, 132) rgb(132, 132, 132) rgb(242, 242, 242)';
   a.style.borderStyle='solid';
   a.style.borderWidth='2px';
   a.style.fontSize='1em';
   a.style.color='#000000';
   a.style.textDecoration='';
   a.style.textTransform='';
   
   var dd=document.createElement('dd');
   div.getElementsByTagName('dl')[0].appendChild(dd);
   dd.appendChild(a);
   
   var i=div.getElementsByTagName('input')[0];
  
   a.addEventListener('click',function(e){
      e.preventDefault();
      window.location='http://google.com/search?q='+i.value+' site:kongregate.com';
      return (false);
   },false);
}, 'false');
})();