🏠 返回首頁 

Greasy Fork is available in English.

GoogleSearchExtraButtons

Кнопки вариантов поиска для страницы поиска Google (1-2-3 дня, недели, PDF, ...)

  1. // ==UserScript==
  2. // @name Google Search Extra Buttons
  3. // @name:ru GoogleSearchExtraButtons
  4. // @description Add buttons (past 1/2/3 days, weeks, PDF search etc.) for Google search page
  5. // @description:ru Кнопки вариантов поиска для страницы поиска Google (1-2-3 дня, недели, PDF, ...)
  6. // @version 46.2022.9.9
  7. // @namespace spmbt.github.com
  8. // @include http://www.google.*/search*
  9. // @include https://www.google.*/search*
  10. // @include https://www.google.*/*
  11. // @include https://encrypted.google.*/search*
  12. // @include https://encrypted.google.*/*
  13. // @include https://spmbt.github.io/googleSearchExtraButtons/saveYourLocalStorage.html
  14. // @include https://www.gstatic.com/sites/p/b9356d/system/services/test.html
  15. // @include https://www.gstatic.com/index.html
  16. // ==/UserScript==
  17. var xLocStI =0, xLocSto = [{origin:'https://spmbt.github.io', restHref:'/googleSearchExtraButtons/saveYourLocalStorage.html'},
  18. {origin:'https://www.gstatic.com', restHref:'/sites/p/b9356d/system/services/test.html', '//':'blank page'},
  19. {origin:'https://www.gstatic.com', restHref:'/index.html', '//':'404 page'}];
  20. // For use own eXternal LocalStorage add to array your origin+restHref of site with https protocol,
  21. // set xLocStI pointed to it, @include directive with this URL. If this script is Chrome extension, fill include_globs in manifest.json.
  22. // TODO If localStorage will be unavailable, script will be use next indexes of array.
  23. if(location.host == xLocSto[xLocStI].origin.replace(/[^/]*\/\//,'')){
  24. window.addEventListener('message', function(ev){
  25. if(/^https?:\/\/www\.google\./.test(ev.origin)){
  26. var d = typeof ev.data =='string' && ev.data[0] =='{' ? JSON.parse(ev.data) : ev.data;
  27. if(!d.do) return;
  28. var tok = d.tok, key = d.key; try{
  29. switch(d.do){
  30. case 'set':
  31. var prev = localStorage[key];
  32. if(d.val !==undefined)
  33. localStorage[key] = JSON.stringify(d.val);
  34. else
  35. localStorage.removeItem(key);
  36. break;
  37. case 'get':
  38. prev = localStorage[key];
  39. prev = prev === undefined || typeof prev =='string'&& prev[0] !='{'? prev : JSON.parse(prev); break;
  40. case 'remove':
  41. prev = localStorage[key];
  42. if(prev !==undefined)
  43. localStorage.removeItem(key);
  44. }} catch(er){}
  45. //xLocStI !=0 && console.log('[xLocSto]', tok, 'prev=', prev);
  46. xLocStI !=0 && ev.source.postMessage(JSON.stringify(prev !==undefined ? {tok: tok, prev: prev} : {tok: tok, undef:1}), ev.origin);
  47. }},!1); //console.log('[xLocSto-1]_'+ xLocStI);
  48. }else (function(setts){ //lang, sites, lastHoursLess
  49. var $x = function(el, h){if(h) for(var i in h) el[i] = h[i]; return el;} //===extend===
  50. ,$pd = function(ev){ev.preventDefault();}
  51. ,d = document
  52. ,$q = function(q, el){return (el||d).querySelector(q)}
  53. ,lh = location.href
  54. ,$e = function(g,el){ //===create or use existing element=== //g={el|clone,cl,ht,cs,at,atRemove,on,apT}
  55. g.el = el || g.el || g.clone ||'DIV';
  56. var o = g.o = g.clone && g.clone.cloneNode && g.clone.cloneNode(!0)
  57. || (typeof g.el =='string' ? d.createElement(g.el) : g.el);
  58. if(o){ //execute if exist
  59. if(g.cl)
  60. o.className = g.cl;
  61. if(g.cs)
  62. $x(o.style, g.cs);
  63. if(g.ht || g.at){
  64. var at = g.at ||{}; if(g.ht) at.innerHTML = g.ht;}
  65. if(at)
  66. for(var i in at){
  67. if(i=='innerHTML') o[i] = at[i];
  68. else o.setAttribute(i, at[i]);}
  69. if(g.atRemove)
  70. for(var i in g.atRemove)
  71. o.removeAttribute(g.atRemove[i]);
  72. if(g.on)
  73. for(var i in g.on) if(g.on[i])
  74. o.addEventListener(i, g.on[i],!1);
  75. g.ap && o.appendChild(g.ap);
  76. g.apT && g.apT.appendChild(o);
  77. }
  78. return o;
  79. },
  80. addRules = function(css){$e({apT: d.getElementsByTagName('head')[0], ap: d.createTextNode(css)},'style')},
  81. //check occurrence of third-party event with growing interval: h.t=time, h.i=count, h.c=check, h.o=occur, h.m=multi
  82. CS = function(h,d){d?h.o(d):h.i--&&setTimeout(function(){CS(h,h.c())},h.t*=h.m)} //example: t:120, i:12, m: 1.6 => wait around 55 sec
  83. //for xLocStor:
  84. ,xLocStorOrigin = d.location.protocol + xLocSto[xLocStI].origin.replace(/[^/]*/,'')
  85. ,qr, qrs ={} //set of queries "key-calls" (ок, toutLitt, toutLong, noService, noStorage)
  86. ,qrI = 0 //queries counter
  87. ,qrN = 12 //max number of waiting queries
  88. ,errIMax = 120, errNMax = errIMax //max number of errors
  89. ,ns ='googXButtons_' //namespace for keys
  90. ,listenMsg
  91. /**
  92. * external localStorage for using another domain if current domain storage is erased anywhere
  93. * @param{String} h.do - action: set|get|remove
  94. * @param{String} h.key
  95. * @param{Object|undefined} h.val (any type)
  96. * @param{Number|undefined} h.toutLitt
  97. * @param{Number|undefined} h.tout
  98. * @param{Function} h.cB - callback with 2 arguments
  99. * @param{Function|undefined} h.err - callback for err with one argument
  100. */
  101. ,xLocStor = function(h){
  102. var h0 = h;
  103. h.toutLitt = h.toutLitt || 400;
  104. h.tout = h.tout || 4000;
  105. var ifr = d.getElementById('xLocStor')
  106. ,query = function(){
  107. if((qrI += 1) > qrN){
  108. xCatch('longQrs', null, h);
  109. return;}
  110. ifr.contentWindow.postMessage(JSON.stringify($x({
  111. do: h.do
  112. ,tok: token
  113. ,key: ns + h.key
  114. }, h.val !==undefined ? {val: h.val}:{}) )
  115. , xLocStorOrigin);
  116. qrs[token] = $x({ //for wait of response
  117. wToutLitt: (function(h, qrI, errIMax){return setTimeout(function(){
  118. qrI -= 1;
  119. if((errIMax -= 1) >=0)
  120. ;//console.warn('toutLitt', h);
  121. chkErrMax();
  122. }, h.toutLitt);})(h, qrI, errIMax)
  123. ,wTout: (function(h, qrI){return setTimeout(function(){
  124. qrI -= 1;
  125. //xCatch('tout', null, h);
  126. //xLocStor(h0);
  127. }, h.tout);})(h, qrI)
  128. }, h);
  129. }
  130. ,token = +new Date() + (Math.random()+'').substr(1,8)
  131. ,el = h.el;
  132. delete h.el;
  133. if(ifr) query();
  134. else ifr = $e({
  135. el: 'iframe',
  136. at:{id: 'xLocStor'
  137. ,src: xLocStorOrigin + xLocSto[xLocStI].restHref},
  138. cs: {display: 'none'},
  139. on: {load: query},
  140. apT: el || d.body
  141. });
  142. if(!listenMsg) addEventListener('message', function(ev){
  143. if(ev.origin == xLocStorOrigin){ // {"tok":"<value>"[,"err":"<txt>"],"h":...}
  144. //console.log('from_io', JSON.parse(ev.data))
  145. var resp = ev.data && ev.data[0] =='{' && JSON.parse(ev.data);
  146. if(!resp) xCatch('bad_format', resp, h);
  147. if(( qr = qrs[resp.tok] )){
  148. qrI -= 1;
  149. qr.cB(resp.prev, resp.undef);
  150. var er = qr.err;
  151. delete qrs[resp.tok];} // else ignore unsufficient token
  152. if(resp.err && (!er || er(resp.err)) ) //individual or common error processing depends of er()
  153. xCatch(resp.err, resp, h);
  154. }},!1);
  155. listenMsg =1;
  156. },
  157. //for tests: localStorage.googXButtons_dwmyh = JSON.stringify({h:[1,2,1,1,1]})
  158. //$('#xLocStor').contentWindow.postMessage('{"do":"get","key":"googXButtons_dwmyh"}',xLocSto[xLocStI].origin)
  159. xCatch = function(er, resp, h){
  160. if((errIMax -= 1) >=0)
  161. console.error('tok:', resp && resp.tok ||'--','; err:', er,'; h:', h,'; respH:', resp && resp.h);
  162. chkErrMax();
  163. },
  164. chkErrMax = function(){if(!errIMax) console.error('Too many err messages:', errNMax)}
  165. ,fileType ='PDF,DOC,RTF,ODF,XLS,ODS,PPT,ODP,TXT,XML,More..., KML,DWF,PS,WPM,BAS,C,CC,CPP,CXX, Java,PL,PY,H,HPP,CS'
  166. .split(/,\s*/).map(function(x){return '&nbsp;'+x+'&nbsp; '})
  167. ,isFTMore =0
  168. ,meta={Goog:'',Duck:'',Bing:'',Ask:'',Baidu:'',Yandex:'',Mailru:'',SlideS:''} //will create child-tabs (window names)
  169. ,imgFile='SVG,JPG,GIF,PNG,BMP,webp,ICO,RAW'.split(',').map(function(x){return '&nbsp;'+x+'&nbsp; '}) //will switch to Img Search
  170. ,imgType='face,clipart,photo,lineart,animated'.split(',') //for Img Search (+imgColor,imgSize,imgSizeLt)
  171. ,imgColor='red,orange,yellow,green,teal,blue,purple,pink,white,gray,black,brown'.split(',')
  172. ,imgSize='l,m,small,icon,>=,Exact...'.split(',')
  173. ,imgSizeLt='vga,svga,xga,2mp,4mp,qsvga'.split(',')
  174. ,$l ={ru:{
  175. 'search in PDF files':'поиск по документам PDF'
  176. ,'search in':'искать по'
  177. ,'More':'Ещё'
  178. ,'search black/white':'искать чёрно-белые'
  179. ,'return to colored':'вернуться к цветным'
  180. ,'from / to':'за период'
  181. ,'past':['за последний','за последние','за последнюю']
  182. ,'day':'сутки'
  183. ,'days':['дня','дней']
  184. ,'week':'неделю'
  185. ,'weeks':['недели','недель']
  186. ,'month':'месяц'
  187. ,'months':['месяца','месяцев']
  188. ,'year':'год'
  189. ,'years':['года','лет']
  190. ,'hour':'час'
  191. ,'hours':['часа','часов']
  192. ,'Settings':'Настройки'
  193. ,'of userscript':'юзерскрипта'
  194. ,'reload page for effect':'перезагрузить страницу'
  195. ,'Interface language':'Язык интерфейса'
  196. ,'Less positions at the end of selects':'Меньше выбора в конце селектов'
  197. ,'Gray design of buttons':'Серый дизайн кнопок'
  198. ,'Show Filetype Button':'Кнопка типов файлов'
  199. ,'Sites':'Сайты'
  200. },fr:{
  201. 'search in PDF files':'la recherche dans les fichiers PDF'
  202. ,'search in':'rechercher dans'
  203. ,'More':'Plus'
  204. ,'search black/white':'trouver noir et blanc'
  205. ,'return to colored':'retour à la couleur'
  206. ,'from / to':'pour la période'
  207. ,'past':['le dernier','dans les derniers','dans les derniers']
  208. ,'day':'jour'
  209. ,'days':['jours','jours']
  210. ,'week':'semaine'
  211. ,'weeks':['semaines','semaines']
  212. ,'month':'mois'
  213. ,'months':['mois','mois']
  214. ,'year':'an'
  215. ,'years':['ans','ans']
  216. ,'hour':'heure'
  217. ,'hours':['heures','heures']
  218. ,'Settings':'Paramètres'
  219. ,'of userscript':'de Userscript'
  220. ,'reload page for effect':'recharger la page pour effet'
  221. ,'Interface language':'Langue de l\'interface'
  222. ,'Less positions at the end of selects':'Moins de choix les longues listes'
  223. ,'Gray design of buttons':'Gris design des boutons'
  224. ,'Show Filetype Button':'Bouton Types de fichiers'
  225. ,'Sites':'Les sites'
  226. },de:{
  227. 'search in PDF files':'Suche in PDF-Dateien'
  228. ,'search in':'Suche in'
  229. ,'More':'Mehr'
  230. ,'search black/white':'schwarz und weiß finden'
  231. ,'return to colored':'zurück zur Farbe'
  232. ,'from / to':'im Zeitraum'
  233. ,'past':['letzte','letzte','letzte']
  234. ,'day':'Tag'
  235. ,'days':['Tage','Tage']
  236. ,'week':'Woche'
  237. ,'weeks':['Wochen','Wochen']
  238. ,'month':'Monat'
  239. ,'months':['Monate','Monate']
  240. ,'year':'Jahr'
  241. ,'years':['Jahre','Jahre']
  242. ,'hour':'Stunde'
  243. ,'hours':['Stunden','Stunden']
  244. ,'Settings':'Einstellungen'
  245. ,'of userscript':'von Userscript'
  246. ,'reload page for effect':'Seite neu laden'
  247. ,'Interface language':'Sprache'
  248. ,'Less positions at the end of selects':'Weniger Auswahl in langen Listen'
  249. ,'Gray design of buttons':'Graues Design der Schaltflächen'
  250. ,'Show Filetype Button':'Schaltfläche Dateitypen'
  251. ,'Sites':'Websites'
  252. },es:{
  253. 'search in PDF files':'búsqueda en archivos PDF'
  254. ,'search in':'busca en'
  255. ,'More':'Más'
  256. ,'search black/white':'encontrar blanco y negro'
  257. ,'return to colored':'volver al color'
  258. ,'from / to':'para el período'
  259. ,'past':['el último','en los últimos','en los últimos']
  260. ,'day':'día'
  261. ,'days':['días','días']
  262. ,'week':'Semana'
  263. ,'weeks':['semanas','semanas']
  264. ,'month':'mes'
  265. ,'months':['meses','meses']
  266. ,'year':'año'
  267. ,'years':['años','años']
  268. ,'hour':'hora'
  269. ,'hours':['horas','horas']
  270. ,'Settings':'Ajustes'
  271. ,'of userscript':'de userscript'
  272. ,'reload page for effect':'página para efecto de recargar'
  273. ,'Interface language':'Idioma de interfaz'
  274. ,'Less positions at the end of selects':'Menos elección en listas largas'
  275. ,'Gray design of buttons':'Diseño gris de botones'
  276. ,'Show Filetype Button':'Botón de tipos de archivo'
  277. ,'Sites':'Sitios'
  278. }},cB; //if !lang, then no hints
  279. var bBack = /^(?:rgba?\((\d+)|#(.))/.exec(window.getComputedStyle(d.body).backgroundColor.replace(/gb/,'gba')), // for Images tab
  280. mDark = (d.querySelectorAll('meta[name="color-scheme"]')[0]||{}).content==='dark'|| bBack && (bBack[1] && bBack[1] <96 || bBack[2] && bBack[2] <6);
  281. addRules('.hp .sfsbc,.sfsbc{display:inline-block}.siteList:hover button{display:block}'
  282. +'.gb_Ib >.gb_e{height:47px}.gb_Fb{z-index:1087}.tsf-p{z-index:203}'
  283. +'.lsbb .xButt,.lsbb >.siteList,.sbibod .xButt,.sbibod >.siteList {z-index:2002; width:34px; height:17px;'
  284. +'padding:0 2px; line-height:14px; font-size:14px; border:1px solid transparent; border-radius:2px;'
  285. +'background-color:#dddae6; color:#eee; opacity:.07; transition:opacity .57s ease-in}'
  286. +'.lsbb >.siteList:hover {background-color:#4889f1}'
  287. +'.lsbb >.siteList,.sbibod >.siteList {width:32px; height:auto; padding:1px 0 2px; text-align:center}'
  288. +'.lsbb >.siteList .lsb >.txt.or {visibility:hidden; position:relative; left:3px; top:-2px; margin-left:-14px;'
  289. +'font-size:9px; font-variant:small-caps; border:1px solid rgb(72, 137, 241); border-radius:8px;'
  290. +'background-color:rgba(233, 238, 247, 0.66); color:rgb(131, 105, 68)}.lsbb >.siteList .lsb >.txt.or.sit {left:-1px}'
  291. +'.lsbb >.siteList .selted .lsb:not(.more):not(.moreShow):not(.sett):hover >.txt.or {visibility:visible}'
  292. //deprecated gray design
  293. +'.lsbb .xButt:hover,.sbibod .xButt:hover,.xButt.xButt2:hover .xButt2,.xButt2:hover{background-color:#c3d4e1; color:#fff; opacity:1}'
  294. +'.xButt2{padding:0 0 2px; background-color:#dad6e2; color:#eee; opacity:1}'
  295. +'.sbibod.lsbb{height:44px}'
  296. +'.sbibod .xButt:hover,.sbibod .xButt2:hover,.sbibod .xButt:hover .xButt2{background-color:#c3c6c7}'
  297. +'.sbibod:not(.lsbb) >.siteList, .sbibod:not(.lsbb) >.xButt2{background-color:#dddae6; opacity:.45}'
  298. +'.sbibod:not(.lsbb) >.siteList:hover, .sbibod:not(.lsbb) >.xButt2:hover{background-color:#dddae6; opacity:.87}'
  299. +'.sbibod >.siteList >.list{background-color:#e1deeb}'
  300. +'.sbibod >.siteList.fade:hover{opacity:1; transition:opacity .1s ease-in}'
  301. +'.sbibod >.siteList.fade{opacity:0.23}'
  302. +'.list .more ~.xButt{display:none!important}'
  303. +'.list .moreShow ~ .xButt{position:absolute!important; left:52px; height:19px!important}'
  304. +'.list .moreShow~.x2.xButt, .list .moreShow~.x2 ~.xButt{left:99px}'
  305. +'.siteList .sett .txt{padding:2px 2px 4px; font-size:14px}'
  306. +'.siteList .settIn{display:none; width:250px; padding:2px 4px; text-align:left; border:1px solid #48f; font-size:14px;'
  307. +'background-color:#dde; color:#336}'
  308. +'.siteList .settIn hr{margin:2px 0}'
  309. +'.sbibtd .sfsbc .nojsb, .siteList .sett:hover .settIn, .siteList .settIn.changed,'
  310. +'.siteList .settIn.changed .reload{display:block}.siteList .settIn .reload, .siteList.hiddn{display:none}'
  311. +'div.gb_g[aria-label="promo"],.pdp-psy.og-pdp, .gb_Sc.gb_g .gb_ha, .gb_g.gb_ha:not(.xpdopen ){display:none}'
  312. +'.xpdopen{display:block!important}.rhsvw{opacity:.16; transition:.4s}.rhsvw:hover{opacity:1}'
  313. +'.srp #sfdiv{overflow:inherit}' //hide promo
  314. +'.UUbT9 >div.aajZCb{background-color:rgba('+(mDark?'40,44,48, 0.92':'255,255,255, 0.75')+');}' //opacity for suggests
  315. +'.UUbT9 ul li div span b{background-color:rgba('+(mDark?'88,93,99':'237,242,248')+', 0.9); margin:0 -6px 0 1px; padding:0 6px 0 0;border-radius:4px;}' //white under suggest texts
  316. +'.gb_kb{padding-left:10px; padding-right:7px}form .RNNXgb{position:relative; background:rgba('+(mDark?'40,44,48':'255,255,255')+', 0.92)}'
  317. +'.RNNXgb, #tsf{width:auto!important} #searchform form#tsf{max-width:auto} body div#searchform,body .ctr-p{min-width:0}'
  318. +'div#searchform.minidiv{top:-8px!important}.minidiv .sfbg{margin-top:-26px!important}' // for narrow sticked searchbar
  319. +'.minidiv .sfbg{top:-39px}.minidiv .sfbg +form#tsf{top:-39px}.minidiv .sfbg +form#tsf:hover{top:0}' //hide sticked
  320. +'.minidiv .sfbg +form#tsf:hover .siteList, .minidiv .sfbg +form#tsf:hover .lsbb >.xButt {top:-6px!important}'
  321. +'.RNNXgb .Tg7LZd {flex:0 0 auto; visibility:hidden; width:44px; height:44px; margin-right:-31px; padding:0 13px 0 0;'
  322. +' border-radius:0 8px 8px 0; background:transparent; border:none; outline:none}'
  323. +'.emcav div.RNNXgb {z-index:998; box-shadow:0 -1px 4px 0 rgba(32,33,36,0.28)}'
  324. +'.minidiv .RNNXgb {z-index:998}.minidiv .RNNXgb:hover {box-shadow:0 -1px 4px 0 rgba(32,33,36,0.28)}'
  325. +'.A8SBwf .logo +.RNNXgb .Tg7LZd {visibility:visible; margin-right:-9px; margin-bottom:-2px; transition:margin 5s ease-in-out}');
  326. try{xLocStor({do:'get', key:'sett', val:setts, cB: cB=function(prev,undef){
  327. S = prev || setts;
  328. S.dwmyh = S.dwmyh || setts.dwmyh; //temp. transitional expr.
  329. console.timeStamp = function(){};
  330. addRules(!(S.whiteMintOval || S.whiteMintOval===undefined) ? //blue old design
  331. '.lsbb .xButt:not(.xButt2),.lsbb >.siteList,.sbibod .xButt:not(.xButt2) {text-align:center; background-color:#4889f1; color:#fff; opacity:0.75}'
  332. +'.lsbb >.siteList .lsb,.sbibod >.siteList .lsb {font-weight:normal; color:#d4d4d4}'
  333. +'.lsbb .lsb:hover,.sbibod .lsb:hover {opacity:1; color:#f1c44a; cursor:default}'
  334. +'.lsbb >.siteList >div:not([class]):hover,.sbibod >.siteList:hover {background-color:#c2d4e0; color:#f7f7f7; opacity:.93}'
  335. +'.lsbb >.siteList >div:not([class]):hover span {color:#aa6c1c}'
  336. +'.lsbb >.siteList .sett .txt{background-color:#4889f1}'
  337. //white-mint-oval design
  338. :'.lsbb .xButt:not(.xButt2), .lsbb >.siteList {text-align:center; background-color:rgb('
  339. +(mDark?'92,100,110':'240,247,248')+'); opacity:0.75; color:rgb('+(mDark?'40,44,48':'137,137,137')+')}'
  340. +'.lsbb >.siteList {border:1px solid rgb('+(mDark?'87,97,108':'183,219,205')+'); border-radius:10px; background-color:rgba('
  341. +(mDark?'86,89,92':'243,243,243')+',0.7); color:rgb('+(mDark?'140,154,173':'75,143,231')+')}'
  342. +'.lsbb >.siteList .lsb {font-weight:normal; border:1px solid rgb('+(mDark?'98,98,90':'210,210,190')
  343. +'); border-radius:10px; background-color:rgb('+(mDark?'77,84,89':'225,239,239')+'); color:rgb(140, 140, 140)}'
  344. +'.lsbb .lsb:hover {opacity:1; color:rgb(152, 123, 43); cursor:default}'
  345. +'.lsbb >.siteList:hover {background-color:rgb('+(mDark?'87,97,108':'183,219,205')+')}'
  346. +'.lsbb .xButt:hover {background-color:rgb(221, 230, 228)}'
  347. +'.lsbb >.siteList >div:not([class]):hover span {color:rgb('+(mDark?'233,140,19':'170,108,28')+')}'
  348. +'.lsbb >.siteList .sett .txt {position:relative; top:2px; margin:0 -2px; padding:1px;' +
  349. 'border:1px solid rgb('+(mDark?'87,97,108':'183,219,205')+'); border-radius:10px; background-color:rgb('+(mDark?'92,100,110':'240,247,248')+')');
  350. CS({t:120, i:12, m: 1.6
  351. ,c: function(){
  352. return d && d.getElementsByName('q') && !/[?&]tbm=(shop|bks|fin)/.test(lh) && d.getElementsByName('q')[0];
  353. },
  354. o: function(dat){
  355. var lang = S.lang != null ? S.lang : setts.lang
  356. ,sites = S.sites && (S.sites.length && S.sites[0] || S.sites.length >1) && S.sites
  357. || typeof sites =='string'&& [sites] || !S.sites && setts.sites || null;
  358. var strSites = sites && sites.join('\n').replace(/^\n/,'\n\n') ||''
  359. ,$L = $l[lang] || $l.ru; //default template of lang
  360. if(!lang || !$l[lang] || lang =='en') for(var l in $L){ //replace 'en' lang for default or substitution
  361. if($L[l] instanceof Array) for(var l2 in $L[l])
  362. $L[l][l2] = l;
  363. else
  364. $L[l] = l;
  365. }
  366. var srch = $q('.RNNXgb')
  367. ,startPg = srch && !$q('button', srch) || /\/(web|img)hp/.test(lh);
  368. if(startPg){
  369. //console.log('==-==startPg', srch);
  370. $e({el:'button', cl:'Tg7LZd', at: {'aria-label':'Google Search', type:'button', jsname:'Tg7LZd'
  371. ,innerHTML:'<div class="gBCQ5d"><span class="z1asCe MZy1Rb">sr</span></div>'}
  372. , apT: srch});
  373. }
  374. var $LSettings = $L['Settings'];
  375. if(sites && sites.length)
  376. sites.push($LSettings);
  377. var mainPg = /\/search\?|&q=|#q=/.test(lh)
  378. ,inputSearch = dat
  379. ,layout1811 = $q('.Tg7LZd') || $q('button[aria-label="Google Search"]') || $q('button[jsname="Tg7LZd"]')
  380. ,design1612 = ($q('#_fZl') || $q('.sbico-c')) && !layout1811
  381. ,d16 = (design1612 || layout1811) && S.design1612
  382. ,imSrch = /[?&]tbm=isch|\/imghp/.test(lh) // sizes are shown if images (outdated): /[&?]tbs[^&]*?(=|,|%2C)imgo(:|%3A)1/i
  383. ,imgTools = imSrch && /[&?]tbs=[^&]*/.exec(lh) //'tbs' with all params
  384. ,isBWShown = imgTools && /[&?]tbs[^&]*?(=|,|%2C)ic(:|%3A)gray/i.exec(lh) // Black-White Images search
  385. ,buttSearcStart = startPg && layout1811 && ($q('input[name="btnK"]') || $q('input[aria-label="Google Search"]')) || $q('button[jsname="Tg7LZd"]') //for the start page
  386. ,buttSearch = d.getElementsByName('btnG') && d.getElementsByName('btnG')[0] || design1612 || layout1811
  387. ,buttS ={
  388. Srch:{url:'', txt:'search'}
  389. ,PDF:{url:'filetype:PDF', txt:$L[imSrch?(isBWShown ?'hide':'show') +' sizes':'search in PDF files']}
  390. ,site:{url:'site:'+ S.sites[0], txt:$L['search in']+' '+ S.sites[0], one:'day'} //you may comment this line
  391. //,'.. : ..':{url:'', txt:$L['from / to']}
  392. ,'1D':{url:'&tbs=qdr:d', txt:$L['past'][1] +' '+ $L['day'], one:'day', up:13,lett:'D'}
  393. ,'1W':{url:'&tbs=qdr:w', txt:$L['past'][2] +' '+ $L['week'], one:'week', up:14,lett:'W'}
  394. ,'1M':{url:'&tbs=qdr:m', txt:$L['past'][0] +' '+ $L['month'], one:'month', up:20,lett:'M'}
  395. ,'1Y':{url:'&tbs=qdr:y', txt:$L['past'][0] +' '+ $L['year'], one:'year', up:15,lett:'Y'}
  396. ,'1H':{url:'&tbs=qdr:h', txt:$L['past'][0] +' '+ $L['hour'], one:'hour', up:23,lett:'H'}
  397. }, ii = -1, iD = -1;
  398. if((design1612 || layout1811) && !d16 && buttSearch && buttSearch.parentNode)
  399. buttSearch.parentNode.className +=' lsbb';
  400. !sites && delete buttS.site;
  401. if(!layout1811 && buttSearch && buttSearch.parentNode){ buttSearch.parentNode.style.position ='relative';
  402. buttSearch.parentNode.style.zIndex ='1003';}
  403. if(buttSearch && top == self) for(var i in buttS) if(i=='site'&& !S.sites || !imSrch || i !='1H'){++ii; //buttons under search input line
  404. if(i.length ==2) iD++; else iD=-1;
  405. var bI = buttS[i]
  406. ,Gesch = ({m:'letzter',f:'letzte',n:'letztes'})['m,f,m,n,f'.split(',')[iD]]
  407. ,hint = function(j){return (j+1) +' '+ (j % 10 || j==10 ? $L[bI.one +'s'][j % 10 <4 && (j/10|0)!=1 ?0:1] : $L[bI.one]) }
  408. ,csLeft = function(ii,a){a = -127 + 37 * (ii -1); return design1612 || layout1811 ?{right: -a+33+'px'}
  409. :{left: a+'px'}}
  410. ,isBWShown2 = isBWShown && i=='PDF'
  411. ,butt2 = $e({clone: i =='site'|| i.length ==2 || i=='PDF'
  412. ? $e({cl: 'siteList', cs: {cursor:'default'}, at: {site: S.sites[0], date: bI.url} })
  413. : i !='.. : ..'|| mainPg ? $e({el:'button', cl: 'xButt ' +(d16 ?'xButt2':'lsb')}) : $e({cl: 'siteList hiddn'})
  414. ,at: {value: iD !=-1 && S.dwmyh[iD] !=1 ? S.dwmyh[iD] + bI.lett : i
  415. ,innerHTML: '<div'+ (d16 ?' class=xButt2':'') +'><s'+ (isBWShown2?'':'pan') +' class=txt onclick=this.parentNode.click();return!1 title="'
  416. +(lang || i=='site'|| i=='.. : ..'
  417. ? ((iD==-1 || S.dwmyh[iD]==1 ? bI.txt : $L['past'][1] +' '+ hint(S.dwmyh[iD]-1))||'').replace(/letzte/,Gesch) :'')
  418. +'" itrvNum="'+ (i=='site'?'': bI.url + (imSrch?'': S.dwmyh[iD])) +'">'
  419. +(iD !=-1 && S.dwmyh[iD] !=1 ? S.dwmyh[iD] + bI.lett : imSrch && i=='PDF' ?'B/W': i) +(isBWShown2?'</s>':'</span>')+'</div>'}
  420. ,cs: $x({position:'absolute', top:startPg ?'40px':'33px',wordSpacing:'-1px',
  421. visibility: ii <= S.hiddenEdgeLeft ?'hidden':'visible'}, $x(csLeft(ii),
  422. ii===2 ? {width:'26px', marginRight:'3px', borderRadius:'2px', lineHeight:'0.75em', marginTop:'0.125em'}:{}))
  423. ,on: {click: (function(bI, i, iD){
  424. //console.log('clic0:', i, iD);
  425. return /Srch|PDF|DOC|site/.test(i)
  426. ? function(ev){
  427. var t = ev.target;
  428. //console.log('cli-DocSite: i,t.class,value,ev,attrSite,$LS,aPSite,bSSta',i, t.className, inputSearch.value,ev, 'attrSite:'
  429. // ,t.getAttribute('site'),'aP:', t.parentNode.getAttribute('site'), buttSearcStart);
  430. if(t && t.className =='defa')
  431. saveLocStor('','','remove'); $pd(ev);
  432. if(t && (t.getAttribute('site')==$LSettings || t.parentNode && t.parentNode.getAttribute('site')==$LSettings)
  433. && !/Srch|PDF|DOC/.test(i)) return;
  434. if(t.classList.contains('settIn')||t.parentNode.classList.contains('settIn')){ev.stopPropagation();return;}
  435. if(t && t.className !='txt')
  436. inputSearch.value = (inputSearch.value||'').replace(/( site(:|%3A)\s*\S*|$)/ig, /Srch|site/.test(i)?'':'$1').replace(/( |\+|&as_)filetype(:|%3A)[^\&]*/g,'')
  437. +' '+ (/Srch|PDF|DOC/.test(i) ? imSrch ?'': bI.url
  438. : 'site:'+ (t && (t.getAttribute('site')|| t.parentNode && t.parentNode.getAttribute('site'))||''));
  439. if(t && (t.getAttribute('site') ==null && t.parentNode && t.parentNode.getAttribute('site') ==null && !/Srch|PDF|DOC/.test(i)))
  440. return;
  441. if(imSrch && i=='PDF'){
  442. ev.stopPropagation();
  443. saveLocStor();
  444. location.href = isBWShown ? lh.replace(new RegExp(imgTools[0]), imgTools && imgTools[0]
  445. .replace(/(,|%2C)?ic(:|%3A)gray/ig,'').replace(/([?&])tbs=?,?(&|$)/,'$1')) //return to colored
  446. : imgTools ? imgTools && lh.replace(new RegExp(imgTools[0]), imgTools[0] + (imgTools[0].length <5 ?'':',') +'ic:gray') //upd.'Show'
  447. : lh + (/\?/.test(lh) ?'&':'?') +'tbs=ic:gray'; //new Tools-More_tools_Show_sizes
  448. }else if(t && /xButt|txt/.test(t.className) && !(i=='site'&& !(/list/.test(t.parentNode.className)
  449. || /list/.test(t.parentNode.parentNode.className))) || t && /Srch|PDF|DOC/.test(t.value))
  450. /*console.log('==startSrch'),*/(buttSearcStart || buttSearch).click();
  451. }: !bI.url ? function(ev){ //from-to date (! not used now)
  452. var el = $q('#cdrlnk'), o;
  453. el && el.dispatchEvent(((o = d.createEvent('Events')).initEvent('click', !0, !1), o));
  454. $pd(ev);
  455. }: function(ev){ //past interval
  456. var t = ev && ev.target, sbd = /,sbd:1/.test(lh), ta = t
  457. ,tOvr = t && t.parentNode, tOv0 = tOvr
  458. ,date2 = tOvr && tOvr.getAttribute('date');
  459. var l2 = startPg ? lh.replace(/^([^/]*)\/\/([^/]+)\/?([^?#]*)([?#]?.*)/, '$1//$2/search$4') : lh; // insert '/search?' instead any
  460. //console.log('cli-Past: value,date2,siteList,list,l2',inputSearch.value,date2,tOvr.classList.contains('siteList'), t.classList.contains('list'), l2);
  461. if(tOvr && tOvr.classList.contains('siteList') && !ta.classList.contains('list')){ //clicked by top button
  462. var elTop = $q('div:not(.list) >.txt', tOvr) ||''
  463. ,itrvNum = elTop && elTop.getAttribute('itrvNum') ||''
  464. ,newSrch = /[?&]q=/.test(l2) ? l2.replace(/(&|\?)q=([^&]*)(&|$)/g,'$1q='+ encodeURIComponent(inputSearch.value) +'$3') //add value to '[?&]q=[^&]*'
  465. : l2 + (/\?/.test(l2) ?'&':'?') +'q='+ encodeURIComponent(inputSearch.value); //set new value as &q=.+
  466. if(layout1811 && itrvNum !=='' && date2)
  467. location.href = /qdr(:|%3A)([dwmyh])\d*/.test(l2)
  468. ? newSrch.replace(/([?&]tbs=)?qdr(:|%3A)[dwmyh]\d*/
  469. ,function(x){return itrvNum.replace(/&/, /\?/.test(x) ?'?':'&')}) //patch date in URL
  470. : newSrch + (/\?/.test(newSrch) ?'&':'?') + itrvNum; //add date in URL
  471. if(itrvNum != null) S.dwmyh[iD] = +(itrvNum ||'').replace(/\D/g,'');
  472. }else if(t.textContent || tOv0.textContent){
  473. var sa = (t.textContent || tOv0.textContent ||'').replace(/\D/g,'');
  474. if(sa.length <=6)
  475. S.dwmyh[iD] = +sa;
  476. }
  477. //console.log('==noDocNoSite', tOvr.value, itrvNum);
  478. $pd(ev);
  479. ev.stopPropagation();
  480. saveLocStor();
  481. }
  482. })(bI, i, iD),
  483. mouseover: i =='site' || i.length ==2 || i=='PDF' ? (function(bI,i){return function(ev){
  484. clearTimeout(bI.ww);
  485. var t = ev.currentTarget;
  486. t.classList.add('fade');
  487. $q('.list', t).style.display ='block';
  488. }})(bI,i) :'',
  489. mouseout: i =='site' || i.length ==2 || i=='PDF' ? (function(bI,i){return function(ev){
  490. var t = ev.currentTarget;
  491. clearTimeout(bI.ww);
  492. bI.ww = setTimeout(function(){
  493. $q('.list',t).style.display ='none';
  494. t.classList.remove('fade');
  495. }, 570);
  496. }})(bI,i) :'',
  497. change: saveLocStor
  498. }
  499. ,apT: buttSearch.parentNode
  500. });
  501. bI.el = butt2;
  502. if(i =='site' || i.length ==2 || i =='PDF'){ //dropdown lists under some buttons
  503. //TODO 'list selted' will be placed if search by filetype or by site was presented (and accordingly buttons will be with 'selted')
  504. var siteList = $e({cl:'list',cs:{display:'none'}, apT: butt2}), arr =[];
  505. for(var j =0; j < (imSrch ?1: bI.up -(i=='1W'&& S.lastHoursLess ?4:0) -(i=='1M'&& S.lastHoursLess ?9:0) -(i=='1Y'&& S.lastHoursLess ?5:0)); j++)
  506. if(i !='1H' || !S.lastHoursLess || j < 8 || j % 2 )
  507. arr.push(hint(j));
  508. //console.log(S.sites,i, S.dwmyh);
  509. var list = i=='site' ? sites ||[] : i =='1D'&& !sites ? arr.concat([$LSettings])
  510. : i=='PDF'? imSrch ? imgFile : fileType : arr,
  511. fTMoreX2 =0;
  512. for(var j in list) if(j !=0 || iD!=-1 && S.dwmyh[iD] !=1){
  513. //console.log('==i,sI', i, sI);
  514. fTMoreX2 = /CPP/.test(fTyp) || fTMoreX2;
  515. var sI = list[j]
  516. ,fTyp = sI.replace(/&nbsp; ?/g,'')
  517. ,fTMore = /More\.\.\./.test(fTyp)
  518. ,butt3 = $e({clone: sI==$LSettings ? $e({cl: 'sett' +(d16 ?' xButt xButt2':' lsb')})
  519. : $e({el:'button', cl: 'xButt' +(d16 ?' xButt2':' lsb') +(fTMore ?' more':'') +(fTMoreX2 ?' x2':'')})
  520. ,at:{value: sI
  521. ,site: sI
  522. ,date: bI.url.replace(/pdf$/i, fTyp)
  523. ,title: sI==$LSettings || !lang ?'':(/site|PDF/.test(i)
  524. ? ($L[i=='PDF'?'search in PDF files':'search in'] +(i=='PDF'?'':' '+ sI)).replace(/PDF/,fTyp)
  525. : j==0 ? bI.txt : $L['past'][1] +' '+ sI).replace(/letzte/,Gesch)
  526. ,innerHTML: (/site|PDF/.test(i) ?'<span class="txt or'+(i=='PDF'?'':' sit')+'" data-val="'+ sI.replace(/&nbsp; ?/g,'') +'" title="' //multiselect mechanics
  527. +(1 ?(i=='PDF'?'':'sites ') +'multiselect'+ (i=='PDF'?' of types':''):'click to disable select')
  528. +'">'+(1 ?'OR':'V')+'</span>':'')
  529. +'<span class=txt>'+ sI +'</span>'+ (sI != $LSettings &&!(!S.sites && i =='1H')
  530. ?'':'<div class="settIn">'
  531. +$L.Settings +' '+ $L['of userscript'] +'<br/>"Google Search Extra Buttons"<hr/>'
  532. +$L['Interface language'] +': <select class="lang" style="width:70px">'
  533. +(function(){var s='<option'+ (lang=='en'?' selected':'') +'>en</option>';
  534. for(var i in $l)
  535. s+='<option'+ (lang==i ?' selected':'') +'>'+ i +'</option>';
  536. return s +'<option value=""'+ (lang==''?' selected':'') +'>en w/o hints</option>'})()
  537. +'</select><br/>'
  538. +'<input type="checkbox" class="less" id="hoursLess"'+ (S.lastHoursLess ?' checked':'')+'/>'
  539. +'<label for="hoursLess" id="hoursLessL">'+ $L['Less positions at the end of selects'] +'</label><br/>'
  540. +'<input type="checkbox" class="des16" id="design1612"'+ (/*!layout1811 &&*/ S.design1612 ?' checked':'')+ (1?' disabled':'')+'/>'
  541. +'<input type="checkbox" class="des18" id="whiteMintOval"'+ (S.whiteMintOval || S.whiteMintOval===undefined ?' checked':'')+'/>'
  542. +'<label for="whiteMintOval" id="whiteMintOvalL">'+ $L['Gray design of buttons'] +'</label><br/>'
  543. +'<input type="checkbox" class="butTyp" id="butTypes"'+ (S.hiddenEdgeLeft ?'':' checked')+'/>'
  544. +'<label for="butTypes" id="butTypesL">'+ $L['Show Filetype Button'] +'</label><br/>'
  545. +'<i><a href="#" class="defa" style="float: right">Default settings</a></i>'
  546. +$L.Sites +': <br/><textarea class="sites" style="width:97%" rows=8>'
  547. + strSites +'</textarea><br/>'
  548. +'<a class="reload" href=# onclick="location.reload();return!1">'
  549. + $L['reload page for effect'] +'</a>'
  550. +'</div>')}
  551. ,cs: Object.assign({position: (sI != $LSettings || design1612 || layout1811)&& !fTMore ?'static':'absolute',display:'block'
  552. ,width: sI != $LSettings ?'auto': /en|es/.test(lang)||!lang ?'3em':'4em'
  553. ,height: sI != $LSettings ?'18px':'16px',margin:'2px 0 -1px -13px', padding:'0 2px 0 1px', minWidth:'42px'
  554. ,top: (19* j - 175 - 133* fTMoreX2) +'px'
  555. ,textAlign:'left', fontWeight:'normal', opacity:1, whiteSpace:'nowrap'}, fTMore ?{top:'18px',left:'47px'}:{})
  556. ,on:{click: (function(fTyp,pdf,fTMore){return function(ev){var t = ev.target;
  557. var less = $q('#hoursLess')
  558. ,des16 = $q('#design1612') //&& !layout1811
  559. ,des18 = $q('#whiteMintOval')
  560. ,butTyp = $q('#butTypes')
  561. ,itrv = t.getAttribute('date')||t.parentNode.getAttribute('date')||''
  562. ,num = (t.getAttribute('site')||t.parentNode.getAttribute('site')||'').replace(/site/.test(itrv)?/^/:/\D/g,'');
  563. //console.log('==clic3:t,itrv,num,fTyp,pdf:',t, itrv, num,'|',fTyp,pdf);
  564. if(t.classList.contains('sett')||t.parentNode.classList.contains('sett')){ev.stopPropagation();return;}
  565. if(less && /hoursLess/.test(t.id)){
  566. less.outerHTML = '<input type="checkbox" class="less" id="hoursLess"'
  567. +(less.getAttribute('checked')!=null ?'':' checked="checked"')+'/>';
  568. saveLocStor();}
  569. if(des16 && /design1612/.test(t.id)){
  570. des16.outerHTML = '<input type="checkbox" class="des16" id="design1612"'
  571. +(des16.getAttribute('checked')!=null ?'':' checked="checked"')+'/>';
  572. saveLocStor();}
  573. if(des18 && /whiteMintOval/.test(t.id)){
  574. des18.outerHTML = '<input type="checkbox" class="des18" id="design1612"'
  575. +(des18.getAttribute('checked')!=null ?'':' checked="checked"')+'/>';
  576. saveLocStor();}
  577. if(butTyp && /butTypes/.test(t.id)){
  578. butTyp.outerHTML = '<input type="checkbox" class="butTyp" id="butTypes"'
  579. +(butTyp.getAttribute('checked')!=null ?'':' checked="checked"')+'/>';
  580. saveLocStor();}
  581. if(pdf || /site/.test(itrv)) {//console.log('==pdf|site');
  582. inputSearch.value = inputSearch.value.replace(new RegExp('(?:(\\s+OR\\s+)?\\s*'
  583. +(pdf ?'filetype':'site')+'(?::|%3A)\\s*\\S*)+|$','g')
  584. ,s1 => fTMore || s1 ?'':' '+ (imSrch? itrv.toLowerCase() + num : itrv +(pdf ?'': fTyp)));}
  585. var l2 = startPg ? lh.replace(/^([^/]*)\/\/([^/]+)\/?([^?#]*)([?#]?.*)/, '$1//$2/search$4') : lh // insert '/search?' instead any
  586. ,newSrch = /[?&]q=/.test(l2) ? l2.replace(/(&|\?)q=([^&]*)(&|$)/g,'$1q='+ encodeURIComponent(inputSearch.value) +'$3') //add value to '[?&]q=[^&]*'
  587. : l2 + (/\?/.test(l2) ?'&':'?') +'q='+ encodeURIComponent(inputSearch.value); //set new value as &q=.+
  588. //console.log('==inputSearch.value,newSrch,fTyp,pdf,num', inputSearch.value, newSrch, fTyp, pdf, num);
  589. if(pdf && !fTMore || num !==''&& num != +num){ev.stopPropagation();}
  590. if(buttSearcStart && (pdf && !fTMore || num !==''&& num != +num)){buttSearcStart.click();return}
  591. if(layout1811 && num !==''|| pdf) {pdf && ev.stopPropagation();
  592. if(!fTMore) location.href = /qdr(:|%3A)([dwmyh])\d*/.test(l2)
  593. ? newSrch.replace(/([?&]tbs=)?qdr(:|%3A)[dwmyh]\d*/
  594. ,function(x){return pdf ?'': (itrv + (imSrch?'': num)).replace(/&/, /\?/.test(x) ?'?':'&')}) //patch date in URL
  595. : newSrch + (/\?/.test(newSrch) ?'&':'?') + (pdf ?'': itrv + (imSrch?'': num)); //add date in URL
  596. else{if(t.classList.contains('txt')) {if(t.parentNode.classList.contains('more')) t.parentNode.className ='xButt lsb moreShow';
  597. else t.parentNode.className ='xButt lsb more';} //'className' because bug of Chrome in upper line with .toggle
  598. else {if(t.classList.contains('more')) t.className ='xButt lsb moreShow';
  599. else t.className ='xButt lsb more';}}} //bug of Fx with .toggle,.toggle - list is changed slow (0.4 s)
  600. $pd(ev);
  601. }})(fTyp,i=='PDF',fTMore)}//, mouseover: function(ev){ev.stopPropagation()}, mouseout: function(ev){ev.stopPropagation()}
  602. ,apT: siteList
  603. });}
  604. siteList.style.height ='auto'; siteList.style.textAlign ='center'; siteList.style.marginRight ='-40px';
  605. }
  606. }
  607. }
  608. });
  609. }, el: d.body})}catch(er){console.log('==cB');cB()}
  610. var saveLocStor = function(ev, val, do2){ var aaa,aab,aac,aad,aae,aaf, t = ev && ev.target.form || document.documentElement || document.body;
  611. xLocStor({do: do2 ||'set', key:'sett'
  612. , val:{lang: (aaa=d.querySelectorAll('.lang', t))[aaa.length-1].value
  613. ,sites: ((aab=d.querySelectorAll('.sites', t))[aab.length-1].value||'').replace(/^[ \t]*|[ \n\t]*$/g,'')
  614. .split('\n')
  615. ,lastHoursLess: (aac=d.querySelectorAll('.less', t))[aac.length-1].checked
  616. ,design1612: (aad=d.querySelectorAll('.des16', t))[aad.length-1].checked
  617. ,whiteMintOval: (aae=d.querySelectorAll('.des18', t))[aae.length-1].checked
  618. ,hiddenEdgeLeft: !(aaf=d.querySelectorAll('.butTyp', t))[aaf.length-1].checked
  619. ,dwmyh: S.dwmyh || setts.dwmyh
  620. }
  621. ,cB: function(prev){
  622. console.info('Settings are saved. prev=', prev);}
  623. });
  624. $q('.siteList .settIn').classList.add('changed');
  625. };
  626. })({ //write "lang:''," to remove hints; 'en' for English hints (fr - Français, es - espagnol), 'ru' for Russian
  627. lang:''|| (navigator.languages && navigator.languages[1] || navigator.language.substr(0,2)) //='' if hide hints, or 2 letters from $l{}
  628. ,sites: [ //=array or one site in string
  629. '','slashdot.org','reddit.com','techcrunch.com','habr.com','geektimes.com'
  630. ,'smashingmagazine.com','engadget.com'] //write your favorite sites
  631. ,lastHoursLess: 1 //=boolean - not show odd some values of hours after 8 h
  632. ,design1612: 0 //=boolean - gray design is disabled for layout1811 ===== TODO enable
  633. ,whiteMintOval: 1 //=boolean - white-mint-oval design with sticked search field
  634. ,hiddenEdgeLeft: 0 //how many extra buttons to hide from left
  635. ,dwmyh: [1,1,1,1,1] //=array of numbers - current vals of days, weeks, months, years, hours
  636. ,fileType:{} // turn on or off {doc:1, txt:1}
  637. ,meta:{} // on/off {Ask:1, }
  638. //TODO meta-data for search of same r###lts {Ya:{title:'',txt:'',url:''},...}
  639. ,imgFile:'' // one of: switch to img search or in img search
  640. ,imgType:{} //{itp:'face'}
  641. ,imgColor:{} //{isc:'blue'}
  642. ,imgSize:{} //{isz:'i'}
  643. ,imgSizeLt:{} //{islt:'vga'}
  644. });