Greasy Fork 还支持 简体中文。

DuckDuckGo - Add Google links with current query

Adds Google links with current query used at DuckDuckGo (for faster and more comfortable way to check alternative search results)

目前為 2018-01-24 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name DuckDuckGo - Add Google links with current query
  3. // @namespace Violentmonkey Scripts
  4. // @description:en Adds Google links with current query used at DuckDuckGo (for faster and more comfortable way to check alternative search results)
  5. // @match https://duckduckgo.com/?*
  6. // @grant none
  7. // @version 0.9
  8. // @description Adds Google links with current query used at DuckDuckGo (for faster and more comfortable way to check alternative search results)
  9. // ==/UserScript==
  10.  
  11. var query = '' + document.forms.x.q.value;
  12. var ds = document.getElementById('duckbar_static');
  13. var link = document.createElement('a');
  14.  
  15. link.innerHTML = 'Google';
  16. link.href = 'https://www.google.com/search?q=' + encodeURIComponent(query);
  17. link.style.verticalAlign = 'top';
  18. link.style.fontWeight = "bold";
  19. //wdt.parentNode.parentNode.insertBefore(link, wdt.parentNode);
  20. var link2 = link.cloneNode();
  21. link2.innerHTML = 'Google';
  22. link2.style.position = 'fixed';
  23. link2.style.right = "110px";
  24. link2.style.bottom = "20px";
  25. link2.style.zIndex = "11";
  26. link2.style.fontSize = "xx-large";
  27.  
  28. ds.parentNode.appendChild(link);
  29. document.body.appendChild(link2);