User:Awesome Aasim/discord.js

// Convert links to Discord opens $(document).ready(function {	$("a.external").each(function(i) { if (new URL($(this).prop("href")).host == "discord.com") { $(this).on("click", function(e) {				e.preventDefault;				$(this).off("click");				let url = new URL($(this).prop("href"));				window.open("discord:" + url.pathname);				location.href = $(this).prop("href");			}); }	}); });