Theme hooks: element marks for layout themes
Facebook Messenger on your desktop, without the Facebook clutter
Brought to you by:
kristoffer-r
Originally created by: kristofferR
Themes can only recolor Messenger through CSS variables and Facebook's own markup, whose class names are generated and whose labels are translated. Layout themes (the store's WhatsApp, Teams, Google Chat, GitHub, Terminal and Slack ports) need stable marks on the parts they style.
Chatpane marks the page with its own names. No fMess compatibility layer: the ported themes are rewritten to these names.
hooks flag (true when the theme CSS mentions data-chatpane-ui, data-chatpane-chats, data-chatpane-list and the like); the appearance script sets html[data-chatpane-theme-hooks], and the page work checks it. Default and the palette themes cost nothing.html[data-chatpane-chats] on /messages… and /messenger_media…; html[data-chatpane-media] while the photo/video viewer is open (reuse the media viewer's detection). html[data-chatpane-dark] already exists.[data-chatpane-list] on the chat list next to [role="main"].data-chatpane-ui marks, found by structure and icon path starts, never by translated labels:composer, composer-bar (reply / link preview bar), composer-field, composer-tools, voice-clip, attach, sticker, gif, emoji, like (Messenger's thumbs-up or the chat's emoji), send, more-actionsrecord-bar, record-play, record-stop, record-canceledit-composer, edit-bar, edit-cancel, edit-box, edit-field, edit-emoji, edit-donechat-header, info, audio-call, video-call, detailslist-header (the row with the title and new-message button), list-menureactions (the picker), more-emojis--messenger-card-spacing: 0 and friends in the chats) and the composer bar's fixed heights released, as the ported themes expect.inject/src/messenger/lib/ with bun test.Adapted from fMess's 09-marks.js (https://github.com/toanbku/fmess, MIT) plus the record-bar mark from toanbku/fmess#50; credit it in the source.
bun test for the classifiers; a sanitized MCP probe that reports which marks are present.Part of [#434].