Last active
March 5, 2020 21:40
-
-
Save misode/1078929457cf8e44c4c107155fac6b87 to your computer and use it in GitHub Desktop.
Chrome extension to shorten the version list on bugs.mojang.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Mojira Shortener", | |
"version": "0.1", | |
"content_scripts": [ | |
{ | |
"matches": [ | |
"https://bugs.mojang.com/*" | |
], | |
"js": [ | |
"mojira.js" | |
] | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mojiraRefreshInterval = setInterval(mojiraRefresh, 100) | |
function mojiraRefresh() { | |
const elt = document.getElementById("versions-field") | |
if (elt && !elt.classList.contains("mojira-shortened")) { | |
elt.style.cssText = "max-height: 100px; overflow-y: scroll;" | |
elt.scrollTop = elt.scrollHeight | |
elt.classList.add("mojira-shortened") | |
console.log("[Mojira] Shortened version list") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment