Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Last active March 17, 2026 02:50
Show Gist options
  • Select an option

  • Save ericboehs/56efd2341689f76510980c2ef5bb1638 to your computer and use it in GitHub Desktop.

Select an option

Save ericboehs/56efd2341689f76510980c2ef5bb1638 to your computer and use it in GitHub Desktop.
Mattermost plugin to disable Show More/Show Less post truncation
var plugin = {
initialize: function() {
var style = document.createElement('style');
style.id = 'no-show-more-plugin';
style.textContent = [
'/* Remove max-height on collapsed posts */',
'.post-message--collapsed .post-message__text-container {',
' max-height: none !important;',
'}',
'/* Remove the gradient fade mask */',
'.post-message--collapsed.post-message--overflow .post-message__text-container {',
' mask-image: none !important;',
' -webkit-mask-image: none !important;',
'}',
'/* Hide the Show More button and lines */',
'.post-collapse__show-more,',
'.post-attachment-collapse__show-more {',
' display: none !important;',
'}',
'/* Also handle sidebar card collapsed */',
'.sidebar-right__card .post-message--collapsed {',
' max-height: none !important;',
'}'
].join('\n');
document.head.appendChild(style);
},
uninitialize: function() {
var el = document.getElementById('no-show-more-plugin');
if (el) el.remove();
}
};
window.registerPlugin('com.boehs.no-show-more', plugin);
{
"id": "com.boehs.no-show-more",
"name": "No Show More",
"description": "Disables the Show More/Show Less post truncation",
"version": "1.0.1",
"min_server_version": "9.0.0",
"webapp": {
"bundle_path": "webapp/dist/main.js"
}
}
@ericboehs
Copy link
Copy Markdown
Author

ericboehs commented Mar 17, 2026

Mattermost "No Show More" Plugin

Mattermost truncates posts taller than 600px behind a "Show More" button. There's no setting to disable this. This webapp-only plugin injects CSS to remove the truncation.

Install

Download com.boehs.no-show-more.tar.gz from this gist, then upload it via System Console > Plugin Management and enable it.

For Docker/headless installs:

docker cp com.boehs.no-show-more.tar.gz mattermost:/tmp/
docker exec mattermost mmctl --local plugin add /tmp/com.boehs.no-show-more.tar.gz
docker exec mattermost mmctl --local plugin enable com.boehs.no-show-more

(EnableLocalMode: true required in config — see blog post for full details.)

Hard-refresh (Cmd+Shift+R) or restart the desktop app after installing.

Tested on Mattermost 11.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment