gooverbatim

Puts a verbatim button on Google for when you want to tell it yes, you really meant what you typed.

  1. // ==UserScript==
  2. // @name gooverbatim
  3. // @namespace http://polpo.org/
  4. // @description Puts a verbatim button on Google for when you want to tell it yes, you really meant what you typed.
  5. // @include http://www.google.*/search*
  6. // @include https://www.google.*/search*
  7. // @include http://www.google.*/webhp*
  8. // @include https://www.google.*/webhp*
  9. // @include http://www.google.*/
  10. // @include https://www.google.*/
  11. // @include https://encrypted.google.*/search*
  12. // @include https://encrypted.google.*/webhp*
  13. // @include https://encrypted.google.*/
  14. // @version 0.5
  15. // ==/UserScript==
  16. (function () {
  17. // Only enable for the "Everything" results page.
  18. var ms = document.getElementById('ms');
  19. if (ms) {
  20. var elms = ms.getElementsByTagName('li');
  21. if (elms[0].className.indexOf("msel") === -1) {
  22. return false;
  23. }
  24. }
  25. var btn = document.createElement('button');
  26. btn.setAttribute('style', 'height: 100%; background-color: #fff; border: 1px solid #999; margin-left: 10px');
  27. var btntxt = document.createTextNode('Yes,\u00a0really');
  28. btn.appendChild(btntxt);
  29. btn.addEventListener('click', function () {
  30. var verboseItem = document.createElement('input');
  31. verboseItem.setAttribute('type', 'hidden');
  32. verboseItem.setAttribute('name', 'tbs');
  33. verboseItem.setAttribute('value', 'li:1');
  34. var tsf = document.forms.namedItem('tsf');
  35. if (tsf) {
  36. tsf.appendChild(verboseItem);
  37. tsf.submit();
  38. }
  39. }, true);
  40. var td = document.createElement('td');
  41. td.appendChild(btn);
  42. var bar = document.getElementById('sftab').parentNode;
  43. if (bar) {
  44. bar.appendChild(td);
  45. }
  46. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址