Skip to content

Instantly share code, notes, and snippets.

@mageddo
Created March 5, 2023 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mageddo/f07e9b5430d16f667d5eb8ea4a7e51f6 to your computer and use it in GitHub Desktop.
Save mageddo/f07e9b5430d16f667d5eb8ea4a7e51f6 to your computer and use it in GitHub Desktop.
Tampermonkey script to fix github emojis on Linux
// ==UserScript==
// @name GitHub Emoji on Linux
// @description Convinces GitHub that Linux supports emoji by removing Linux from the user-agent.
// @version 1
// @namespace https://userscripts.kevincox.ca
// @match https://github.com/*
// @run-at document-start
// ==/UserScript==
!function(){
"use strict";
const e = navigator.userAgent.replace("Linux","LinMoji") + " (https://github.com/github/g-emoji-element/issues/2)";
Object.defineProperty(unsafeWindow.navigator, "userAgent", {get:exportFunction((function(){return e}),window)})
}();
//# sourceMappingURL=github-emoji-linux.user.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment