Qwant Search Engine for Opera

Redirect you to Qwant Services

  1. // ==UserScript==
  2. // @name Qwant Search Engine for Opera
  3. // @namespace https://github.com/LePliex/Qwant-Search-Engine-for-Opera-Browser
  4. // @version 1.0
  5. // @description Redirect you to Qwant Services
  6. // @author LePliex (https://github.com/LePliex)
  7. // @match https://duckduckgo.com/*
  8. // @icon https://i.imgur.com/2pLe6tY.png
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12. (function() {
  13. document.querySelector("html").remove();
  14. document.appendChild(document.createElement("html"));
  15. document.querySelector("html").style.background = "#1c1c1c";
  16. let URL = window.location.href;
  17. let fSplit = URL.split("&");
  18. let sSplit = fSplit[0].split("=");
  19. let pSplit = sSplit[1].split("+");
  20. let final = "";
  21. let Maps = new RegExp('QMaps');
  22. let Music = new RegExp('QMusic');
  23. if (sSplit[0] === "" || sSplit[1] === undefined) {
  24. window.location.href = "https://www.qwant.com/";
  25. } else if (sSplit[1].match(Music)) {
  26. if (sSplit[1] != undefined) {
  27. for (let i = 1; i < pSplit.length; i++) {
  28. final += "%20" + pSplit[i];
  29. }
  30. window.location.href = "https://www.qwant.com/music/search?q=" + final;
  31. } else {
  32. window.location.href = "https://www.qwant.com/music";
  33. }
  34. } else if (sSplit[1].match(Maps)) {
  35. if (sSplit[1] != undefined) {
  36. for (let i = 1; i < pSplit.length; i++) {
  37. final += "%20" + pSplit[i];
  38. }
  39. window.location.href = "https://www.qwant.com/maps?q=" + final;
  40. } else {
  41. window.location.href = "https://www.qwant.com/maps";
  42. }
  43. } else {
  44. window.location.href = "https://www.qwant.com/?q=" + sSplit[1];
  45. }
  46. 'use strict';
  47. })();

QingJ © 2025

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