For education purposes only. All code credit to @retronbv, I just decided to make this gist along with instructions because I wanted to share it with more people and I also thought you might like it. 😄 Click here to view the original console version. This also might be against the Discord TOS, so use at your own risk!
Select all the code of a version of the bookmarklet and drag that text into your bookmarks bar. Rename it if you would like. In the future you can open up a random website, click this, wait for the nitro to load, and if you didn't receive Nitro then click the bookmarklet again. To open up a new tab of possible Discord Nitro every time you click it, hold the Ctrl key as you press your mouse onto the bookmarklet. This will work even on chromium-based new tab pages! (Clicking the bookmarklet without holding the Ctrl key will not work on chromium-based new tab pages. It will open up a gift of possible Discord Nitro in your current tab.)
javascript:giftCode=function(){let code="";let letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var i=0;i<24;i+=1){code=code+letters.charAt(Math.floor(Math.random()*letters.length))}location.href="https://discord.gift/"+code};giftCode();
javascript:giftCode=function(){let code="";let letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var i=0;i<1;6i+=1){code=code+letters.charAt(Math.floor(Math.random()*letters.length))}location.href="https://discord.gift/"+code};giftCode();