mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 06:30:45 +08:00
Keep all IM channels; rename package/cordis id for local profile install without colliding with the community plugin. Document fork intent in FORK.md. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
731 B
JavaScript
19 lines
731 B
JavaScript
export const TELEGRAM_STYLE_ID = 'xmanrui-dsh-im-telegram-settings';
|
|
|
|
const CSS = String.raw`
|
|
.dtg-page { --ddt-accent: #229ed9; --ddt-accent-deep: #1687bd; --ddt-accent-wash: #eaf7fd; }
|
|
.dtg-avatar { color: #fff; background: #229ed9; }
|
|
.dtg-avatar svg { display: block; }
|
|
`;
|
|
|
|
export function installTelegramStyles() {
|
|
if (typeof document === 'undefined') return () => {};
|
|
const existing = document.querySelector(`style[data-plugin-css="${TELEGRAM_STYLE_ID}"]`);
|
|
if (existing) return () => {};
|
|
const style = document.createElement('style');
|
|
style.dataset.plugin = 'dsh-im-ops';
|
|
style.dataset.pluginCss = TELEGRAM_STYLE_ID;
|
|
style.textContent = CSS;
|
|
document.head.appendChild(style);
|
|
return () => style.remove();
|
|
}
|