Github markdown does not support JavaScript links, so you'll have to bookmark them manually. To use the script, add a bookmark with the raw code as an URL to your browser bar.
Note that SERP related scripts may stop working due to changes in the html code of the Search Results page.
Note that bookmarklets for validating pages on the fly may not work until you allow pop-ups.
To use this bookmarklet, first go to a page with the origin https://www.google.com/. Then click the bookmark and fill the input fields. You can set a custom domain to search over or skip the 1st field. As a search query, you can submit a string with white spaces: it would mean that all the words should be found in URLs.
If you press the Search button, you'll get one easy-to-copy list of URLs from all the result pages. When the script runs, you may need to pass the reCAPTCHA challenge. Then the script execution will be blocked, and you'll have to run it again.
On the page whose links you want to check, click the bookmarklet. All nofollow links should turn yellow; dofollow should become green. UGC or Sponsored links should have orange or red borders.