Skip to content

Instantly share code, notes, and snippets.

@misode
Last active March 5, 2020 21:40
Show Gist options
  • Save misode/1078929457cf8e44c4c107155fac6b87 to your computer and use it in GitHub Desktop.
Save misode/1078929457cf8e44c4c107155fac6b87 to your computer and use it in GitHub Desktop.
Chrome extension to shorten the version list on bugs.mojang.com
{
"manifest_version": 2,
"name": "Mojira Shortener",
"version": "0.1",
"content_scripts": [
{
"matches": [
"https://bugs.mojang.com/*"
],
"js": [
"mojira.js"
]
}
]
}
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