Skip to content

Instantly share code, notes, and snippets.

@dvingerh
Created January 25, 2020 15:41
Show Gist options
  • Save dvingerh/4230a1c8305fb5dac3da0f3b63ecd2dd to your computer and use it in GitHub Desktop.
Save dvingerh/4230a1c8305fb5dac3da0f3b63ecd2dd to your computer and use it in GitHub Desktop.
Useful for emote servers you're in but whose emotes you cannot access. Will open the greyed out emoji in a new tab.
// ==UserScript==
// @name Discord Nitro Emoji In New Tab
// @description Useful for emote servers you're in but whose emotes you cannot access if you don't have Nitro. Will open the greyed out emoji in a new tab.
// @namespace Violentmonkey Scripts
// @grant GM_addStyle
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @require https://raw.githubusercontent.com/pie6k/jquery.initialize/master/jquery.initialize.min.js
// @match *://discordapp.com/*
//
// ==/UserScript==
$(document).on("click", "div[class*='emojiItem-']", function(e) {
e.preventDefault();
if ($(this).attr("class").indexOf("disabled") != -1) {
var url = $(this).attr("style").split("\"")[1].split("\"")[0];
console.log(url);
window.open(url, '_blank');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment