title: Ecosia as Default Search Engine in Opera
body: <p>Opera doesn't let you set <a href="https://www.ecosia.org/" rel="nofollow noreferrer"><strong>Ecosia</strong></a> as the default search engine.<br>
  I'm a beginner. The workaround below is simple, but I'm posting it so that other beginners can use it as-is.<br>
  Just trying to help.</p>
  
  <p><strong>Steps:</strong><br>
  1) Go to Opera settings, scroll down to "Search engine".<br>
  　　　Set DuckDuckGo.com as your default search engine.</p>
  
  <p>2) Install the <a href="https://addons.opera.com/en-gb/extensions/details/tampermonkey-beta/" rel="nofollow noreferrer"><strong>TamperMonkey</strong></a> extension.<br>
  　　　This allows you to automatically add JavaScript to pages you browse.</p>
  
  <p>3) Enter the following code into <strong>TamperMonkey</strong><br>
  　　　<strong>NOTE: NEVER</strong> use scripts from an unknown source.<br>
  　　　This is just a one-line redirect, posting the script here so anyone can review it.</p>
  
  <pre><code>// ==UserScript==
  // @name         Ecosia Default Search Engine in Opera
  // @version      1.01
  // @description  Sets Ecosia as default search engine by automatically redirecting you
  //               when you search in DuckDuckGo.
  // @author       Hagbard Hednig
  // @match        http*://*duckduckgo.com/*?*q=*
  // @namespace http://tampermonkey.net/
  // ==/UserScript==
  
  (function() {
      location.href=('https://www.ecosia.org/search?'+window.location.href.substring(window.location.href.indexOf('q='),window.location.href.length));
  })();
  </code></pre>
  
  <p>No errors, no permissions required.<br>
  <strong>Just posting the solution to help other beginners.</strong></p>