Created
April 5, 2017 22:07
-
-
Save BehindTheMath/72ad999427da2f74c1c956165acdb8bc to your computer and use it in GitHub Desktop.
A Greasemonkey / Tampermonkey user script to remove ";wap2" from the end of links in Google search results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Fix links in Google search results with ";wap2" | |
| // @description Remove ";wap2" from the end of links in Google search results | |
| // @namespace behindthemath.io | |
| // @include *google.com/search?q=* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| (function removeWap2 () { | |
| console.log('Removing ";wap2" from the end of links in Google search results'); | |
| var nodes = document.querySelectorAll('a[href$=";wap2"]'); | |
| for (var node of nodes) { | |
| var oldHref = node.href; | |
| node.href = oldHref.substring(0, oldHref.length - 5); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment