├── LICENSE ├── README.md └── script.user.js /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Zenith 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fix Google Web Search 2 | 3 | ## Description 4 | This userscript removes AI results and other unwanted content from Google web searches by adding the `udm=14` parameter to the search URL. This parameter switches the search to the "Web" tab, which displays only traditional web page results. 5 | 6 | ## Features 7 | - Adds `udm=14` to the search parameters of a new Google search, switching to the "Web" tab. 8 | - Updates all other `href^="/search"` links on the page to include a udm parameter. 9 | - Works on all Google Top Level Domains (`.com`, `.co.uk`, `.ru`, `etc.`). 10 | 11 | ## Installation 12 | 1. Install a userscript manager extension like [Greasemonkey](https://www.greasespot.net/) (Firefox), [Userscripts](https://apps.apple.com/us/app/userscripts/id1463298887) (Safari), [Tampermonkey](https://www.tampermonkey.net/) (Chrome, Edge, Firefox, Safari), or [Violentmonkey](https://violentmonkey.github.io/) (Chrome, Firefox, Edge). 13 | 2. Copy the userscript code from the provided source file (`script.user.js`). 14 | 3. Follow your exension's instructions in creating/using a new userscript. 15 | 4. Save the userscript and enable it. 16 | 17 | ### Other Sources for Installation 18 | 19 | [GreasyFork](https://greasyfork.org/en/scripts/495638-fix-google-web-search) 20 | 21 | [OpenUserJS](https://openuserjs.org/scripts/ZenithO_o/Fix_Google_Web_Search) 22 | 23 | ## Usage 24 | Once installed and enabled, the userscript will automatically do the described functionality. No extra steps required! 25 | 26 | ## Personal notes 27 | - This readme took longer to write than the code lol 28 | - Sorry you had to read all the `@match` params. Would have used `@include` for proper matching, but apparently Manifest V3 makes it weird or something, idk. Spent 3 minutes looking it up. 29 | -------------------------------------------------------------------------------- /script.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Fix Google Web Search 3 | // @namespace http://tampermonkey.net/ 4 | // @version 2024-05-26 5 | // @license MIT 6 | // @description Remove AI results and other fluff from your Google search! Adds udm=14 to the search params of a new Google search, changing to the "Web" tab. 7 | // @author ZenithO-o 8 | // @match *://*.google.com/search* 9 | // @match *://*.google.ad/search* 10 | // @match *://*.google.ae/search* 11 | // @match *://*.google.com.af/search* 12 | // @match *://*.google.com.ag/search* 13 | // @match *://*.google.al/search* 14 | // @match *://*.google.am/search* 15 | // @match *://*.google.co.ao/search* 16 | // @match *://*.google.com.ar/search* 17 | // @match *://*.google.as/search* 18 | // @match *://*.google.at/search* 19 | // @match *://*.google.com.au/search* 20 | // @match *://*.google.az/search* 21 | // @match *://*.google.ba/search* 22 | // @match *://*.google.com.bd/search* 23 | // @match *://*.google.be/search* 24 | // @match *://*.google.bf/search* 25 | // @match *://*.google.bg/search* 26 | // @match *://*.google.com.bh/search* 27 | // @match *://*.google.bi/search* 28 | // @match *://*.google.bj/search* 29 | // @match *://*.google.com.bn/search* 30 | // @match *://*.google.com.bo/search* 31 | // @match *://*.google.com.br/search* 32 | // @match *://*.google.bs/search* 33 | // @match *://*.google.bt/search* 34 | // @match *://*.google.co.bw/search* 35 | // @match *://*.google.by/search* 36 | // @match *://*.google.com.bz/search* 37 | // @match *://*.google.ca/search* 38 | // @match *://*.google.cd/search* 39 | // @match *://*.google.cf/search* 40 | // @match *://*.google.cg/search* 41 | // @match *://*.google.ch/search* 42 | // @match *://*.google.ci/search* 43 | // @match *://*.google.co.ck/search* 44 | // @match *://*.google.cl/search* 45 | // @match *://*.google.cm/search* 46 | // @match *://*.google.cn/search* 47 | // @match *://*.google.com.co/search* 48 | // @match *://*.google.co.cr/search* 49 | // @match *://*.google.com.cu/search* 50 | // @match *://*.google.cv/search* 51 | // @match *://*.google.com.cy/search* 52 | // @match *://*.google.cz/search* 53 | // @match *://*.google.de/search* 54 | // @match *://*.google.dj/search* 55 | // @match *://*.google.dk/search* 56 | // @match *://*.google.dm/search* 57 | // @match *://*.google.com.do/search* 58 | // @match *://*.google.dz/search* 59 | // @match *://*.google.com.ec/search* 60 | // @match *://*.google.ee/search* 61 | // @match *://*.google.com.eg/search* 62 | // @match *://*.google.es/search* 63 | // @match *://*.google.com.et/search* 64 | // @match *://*.google.fi/search* 65 | // @match *://*.google.com.fj/search* 66 | // @match *://*.google.fm/search* 67 | // @match *://*.google.fr/search* 68 | // @match *://*.google.ga/search* 69 | // @match *://*.google.ge/search* 70 | // @match *://*.google.gg/search* 71 | // @match *://*.google.com.gh/search* 72 | // @match *://*.google.com.gi/search* 73 | // @match *://*.google.gl/search* 74 | // @match *://*.google.gm/search* 75 | // @match *://*.google.gr/search* 76 | // @match *://*.google.com.gt/search* 77 | // @match *://*.google.gy/search* 78 | // @match *://*.google.com.hk/search* 79 | // @match *://*.google.hn/search* 80 | // @match *://*.google.hr/search* 81 | // @match *://*.google.ht/search* 82 | // @match *://*.google.hu/search* 83 | // @match *://*.google.co.id/search* 84 | // @match *://*.google.ie/search* 85 | // @match *://*.google.co.il/search* 86 | // @match *://*.google.im/search* 87 | // @match *://*.google.co.in/search* 88 | // @match *://*.google.iq/search* 89 | // @match *://*.google.is/search* 90 | // @match *://*.google.it/search* 91 | // @match *://*.google.je/search* 92 | // @match *://*.google.com.jm/search* 93 | // @match *://*.google.jo/search* 94 | // @match *://*.google.co.jp/search* 95 | // @match *://*.google.co.ke/search* 96 | // @match *://*.google.com.kh/search* 97 | // @match *://*.google.ki/search* 98 | // @match *://*.google.kg/search* 99 | // @match *://*.google.co.kr/search* 100 | // @match *://*.google.com.kw/search* 101 | // @match *://*.google.kz/search* 102 | // @match *://*.google.la/search* 103 | // @match *://*.google.com.lb/search* 104 | // @match *://*.google.li/search* 105 | // @match *://*.google.lk/search* 106 | // @match *://*.google.co.ls/search* 107 | // @match *://*.google.lt/search* 108 | // @match *://*.google.lu/search* 109 | // @match *://*.google.lv/search* 110 | // @match *://*.google.com.ly/search* 111 | // @match *://*.google.co.ma/search* 112 | // @match *://*.google.md/search* 113 | // @match *://*.google.me/search* 114 | // @match *://*.google.mg/search* 115 | // @match *://*.google.mk/search* 116 | // @match *://*.google.ml/search* 117 | // @match *://*.google.com.mm/search* 118 | // @match *://*.google.mn/search* 119 | // @match *://*.google.com.mt/search* 120 | // @match *://*.google.mu/search* 121 | // @match *://*.google.mv/search* 122 | // @match *://*.google.mw/search* 123 | // @match *://*.google.com.mx/search* 124 | // @match *://*.google.com.my/search* 125 | // @match *://*.google.co.mz/search* 126 | // @match *://*.google.com.na/search* 127 | // @match *://*.google.com.ng/search* 128 | // @match *://*.google.com.ni/search* 129 | // @match *://*.google.ne/search* 130 | // @match *://*.google.nl/search* 131 | // @match *://*.google.no/search* 132 | // @match *://*.google.com.np/search* 133 | // @match *://*.google.nr/search* 134 | // @match *://*.google.nu/search* 135 | // @match *://*.google.co.nz/search* 136 | // @match *://*.google.com.om/search* 137 | // @match *://*.google.com.pa/search* 138 | // @match *://*.google.com.pe/search* 139 | // @match *://*.google.com.pg/search* 140 | // @match *://*.google.com.ph/search* 141 | // @match *://*.google.com.pk/search* 142 | // @match *://*.google.pl/search* 143 | // @match *://*.google.pn/search* 144 | // @match *://*.google.com.pr/search* 145 | // @match *://*.google.ps/search* 146 | // @match *://*.google.pt/search* 147 | // @match *://*.google.com.py/search* 148 | // @match *://*.google.com.qa/search* 149 | // @match *://*.google.ro/search* 150 | // @match *://*.google.ru/search* 151 | // @match *://*.google.rw/search* 152 | // @match *://*.google.com.sa/search* 153 | // @match *://*.google.com.sb/search* 154 | // @match *://*.google.sc/search* 155 | // @match *://*.google.se/search* 156 | // @match *://*.google.com.sg/search* 157 | // @match *://*.google.sh/search* 158 | // @match *://*.google.si/search* 159 | // @match *://*.google.sk/search* 160 | // @match *://*.google.com.sl/search* 161 | // @match *://*.google.sn/search* 162 | // @match *://*.google.so/search* 163 | // @match *://*.google.sm/search* 164 | // @match *://*.google.sr/search* 165 | // @match *://*.google.st/search* 166 | // @match *://*.google.com.sv/search* 167 | // @match *://*.google.td/search* 168 | // @match *://*.google.tg/search* 169 | // @match *://*.google.co.th/search* 170 | // @match *://*.google.com.tj/search* 171 | // @match *://*.google.tl/search* 172 | // @match *://*.google.tm/search* 173 | // @match *://*.google.tn/search* 174 | // @match *://*.google.to/search* 175 | // @match *://*.google.com.tr/search* 176 | // @match *://*.google.tt/search* 177 | // @match *://*.google.com.tw/search* 178 | // @match *://*.google.co.tz/search* 179 | // @match *://*.google.com.ua/search* 180 | // @match *://*.google.co.ug/search* 181 | // @match *://*.google.co.uk/search* 182 | // @match *://*.google.com.uy/search* 183 | // @match *://*.google.co.uz/search* 184 | // @match *://*.google.com.vc/search* 185 | // @match *://*.google.co.ve/search* 186 | // @match *://*.google.co.vi/search* 187 | // @match *://*.google.com.vn/search* 188 | // @match *://*.google.vu/search* 189 | // @match *://*.google.ws/search* 190 | // @match *://*.google.rs/search* 191 | // @match *://*.google.co.za/search* 192 | // @match *://*.google.co.zm/search* 193 | // @match *://*.google.co.zw/search* 194 | // @match *://*.google.cat/search* 195 | // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com 196 | // @grant none 197 | // @downloadURL https://update.greasyfork.org/scripts/495638/Fix%20Google%20Web%20Search.user.js 198 | // @updateURL https://update.greasyfork.org/scripts/495638/Fix%20Google%20Web%20Search.meta.js 199 | // ==/UserScript== 200 | 201 | (function () { 202 | "use strict"; 203 | 204 | // Checks if all Google search links on the page have a udm parameter. 205 | const searchLinks = document.querySelectorAll('a[href^="/search"]'); 206 | searchLinks.forEach((link) => { 207 | const linkURL = new URL(link.href); 208 | if (!linkURL.searchParams.has("udm")) { 209 | // Add a placeholder param 210 | linkURL.searchParams.set("udm", "1"); 211 | link.href = linkURL.toString(); 212 | } 213 | }); 214 | 215 | // Evaluate current location, and add udm for Web search. 216 | let currentURL = new URL(window.location.href); 217 | if (currentURL.searchParams.get("udm")) { 218 | return; // Already has a udm param 219 | } 220 | 221 | currentURL.searchParams.set("udm", "14"); 222 | const newURL = currentURL.toString(); 223 | window.location.replace(newURL); 224 | })(); 225 | --------------------------------------------------------------------------------