Last active
January 7, 2024 13:22
-
-
Save edvinassabaliauskas/a3f5650ffbda9d4cd5e988c33c3dcbff to your computer and use it in GitHub Desktop.
Dark theme enabler for Rocket.Chat. Theme taken from https://github.com/0x0049/Rocket.Chat.Dark
This file contains 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
var ThemeEnabler = { | |
isThemeOn: false, | |
controls: null, | |
onAppLoaded: async function() { | |
this.checkCookie() | |
do { | |
await this._sleep(100); | |
// console.log("... waiting for footer"); | |
} while (!$('footer')[0]) | |
// console.log("Footer found!"); | |
this.addControls(); | |
this.updateControls(); | |
}, | |
checkCookie: function () { | |
var theme = this.getCookie('_theme'); | |
if (theme == 'black') { | |
this.applyTheme() | |
} | |
}, | |
addControls: function () { | |
this.controls = $('<span title="...and never look back." style="color: #444; margin-left: 10px; position: relative; top: -5px;">Go Black</span>'); | |
this.controls.appendTo('footer.sidebar__footer'); | |
var self = this; | |
this.controls.on('click', function () { | |
if (self.isThemeOn) { | |
self.eraseCookie('_theme'); | |
$('style#theme-black').remove(); | |
self.isThemeOn = false; | |
} else { | |
self.createCookie('_theme', 'black', 100); | |
self.applyTheme(); | |
} | |
self.updateControls(); | |
}) | |
}, | |
updateControls: function () { | |
if (this.isThemeOn) { | |
this.controls.text("Go Blackn't"); | |
} else { | |
this.controls.text("Go Black"); | |
} | |
}, | |
applyTheme: function () { | |
this.isThemeOn = true; | |
$('<style id="theme-black" type="text/css">' + this.__theme__ + '</style>').appendTo('head'); | |
}, | |
__theme__: ` | |
::-webkit-input-placeholder{color:#5b6068!important}:-moz-placeholder{color:#5b6068!important}::-moz-placeholder{color:#5b6068!important}:-ms-input-placeholder{color:#5b6068!important}:root:root{--badge-unread-background:#7289da;--rc-color-button-primary:#7289da;--rc-color-primary:#c2c3c5;--rc-color-primary-lightest:#2f3236;--rc-color-primary-dark:#2c2e32;--rc-color-primary-darkest:#282a2e;--status-online:#43b581;--status-away:#fcb316;--status-busy:#f04747;--status-invisible:#bbb;--popover-background:#2a2c31;--popover-title-color:#bbb;--popover-item-color:#bbb;--popover-divider-color:#26282c;--sidebar-background:#2f3136;--badge-background:#3e4147;--sidebar-item-hover-background:#292b2f;--sidebar-item-popup-background:#292b2f;--message-box-container-border-color:#505257;--rc-color-error:#f04747;--create-channel-title-color:#c2c3c5;--tags-border-color:#505257;--popup-list-background:#2a2c31;--popup-list-name-color:#bbb;--popup-list-background-hover:#7289da;--popup-list-selected-background:#7289da;--tags-text-color:#fff;--tags-background:#7289da;--message-box-markdown-color:#c2c3c5;--message-box-markdown-hover-color:#5f6164;--message-box-user-typing-user-color:#7289da;--header-background-color:#36393e;--header-title-username-color-darker:#c2c3c5;--color-darkest:#7c7e81;--tooltip-background:#2a2c31;--rc-color-alert-message-primary-background:#2a2c31;--rc-color-alert-message-secondary-background:#2a2c31;--chip-background:#7289da;--header-title-status-color:#9a9c9f;--color-gray-lightest:#c2c3c5}.color-primary-font-color{color:#dcddde}.content-background-color,.full-page,.loading-animation,.page-loading,body,html{background-color:#36393e}.rc-old #login-card{background-color:#2a2c31}.secondary-background-color{background-color:#2a2c31}.border-secondary-background-color{border-color:#3d4048}.border-component-color{border:#313338}.background-component-color,.background-primary-action-color{background-color:#7289da}.background-info-font-color,.background-transparent-darker-before::before{background-color:#7289da}.secondary-font-color{color:#e2e7f7}.button,.button.primary,.rc-button{background-color:#7289da;color:#e2e7f7;border:none}.button.primary:hover,.button:hover,.rc-button:hover{color:#e2e7f7;background-color:#5873d3;opacity:1!important}.button.primary[disabled],.button[disabled],.rc-button[disabled]{background-color:#54618c;color:#8c909a}.rc-button--outline{background-color:transparent;border:2px solid #7289da;color:#7289da}.rc-button--outline:hover{background-color:transparent;border-color:#5873d3;color:#5873d3}.rc-button--outline[disabled]{background-color:transparent;border-color:#54618c;color:#54618c}.button.danger,.rc-button--cancel{background-color:#f04747;color:#fcdada}.button.danger:hover,.rc-button--cancel:hover{background-color:#ee2a2a;color:#fcdada;opacity:1!important}.button.danger[disabled],.rc-button--cancel[disabled]{background-color:#934042;color:#99898c}.rc-button--cancel.rc-button--outline{background-color:transparent;border:2px solid #f04747;color:#f04747}.rc-button--cancel.rc-button--outline:hover{background-color:transparent;border-color:#ee2a2a;color:#ee2a2a}.rc-button--cancel.rc-button--outline[disabled]{background-color:transparent;border-color:#934042;color:#934042}.button.secondary,.rc-button--secondary{background-color:#bbb;color:#2a2c31}.button.secondary:hover,.rc-button--secondary:hover{background-color:#a8a8a8;color:#2a2c31;opacity:1!important}.button.secondary[disabled],.rc-button--secondary[disabled]{background-color:#787a7c;color:#32353a}.flex-tab .loading-animation>div,.loading-animation>div,.main-content .loading-animation>div{background-color:#bbb}.rc-header,.rc-old .fixed-title{border-bottom:1px solid #313338;-webkit-box-shadow:none;box-shadow:none}.messages-container .footer{background:0 0;border-top-style:solid;border-top-width:1px;-webkit-box-shadow:0 1px 2px -1px #424449;box-shadow:0 1px 2px -1px #424449}.messages-box .start{color:#888;text-transform:uppercase;font-weight:700;font-size:12px}.message a{color:#7289da}.message a:hover{color:#5873d3}.message .mention-link{background-color:transparent}.avatar{-webkit-box-shadow:1px 1px 3px 0 rgba(0,0,0,.5);box-shadow:1px 1px 3px 0 rgba(0,0,0,.5)}.sidebar{-webkit-box-shadow:1px 0 2px -1px rgba(0,0,0,.5);box-shadow:1px 0 2px -1px rgba(0,0,0,.5);border-right:1px solid #2f3136}.rc-old .flex-tab-container .flex-tab-bar{background-color:#2f3136;border-left:1px solid #313338;-webkit-box-shadow:-1px 0 2px -1px rgba(0,0,0,.5);box-shadow:-1px 0 2px -1px rgba(0,0,0,.5)}.rc-old .flex-tab-container .flex-tab-bar .tab-button-icon{color:#bbb;fill:#bbb}.rc-old .flex-tab-container .flex-tab-bar .tab-button.active,.rc-old .flex-tab-container .flex-tab-bar .tab-button:hover{background-color:#2f3136}.contextual-bar,.flex-tab .content,.flex-tab .list-view,.flex-tab .user-view,.rc-user-info-container{background-color:#2f3136}.rc-user-info-details{background-color:#2a2c31}.rc-user-info-details__info{color:#bbb;font-size:.9em}.rc-user-info-details__label{font-size:1em;margin-bottom:.5em}.flex-tab input:focus,.flex-tab select:focus,.flex-tab textarea:focus{border-color:#565d71}.flex-tab .channel-settings .button,.flex-tab .channel-settings .buttons .button{background-color:#2a2c31;color:#bbb}.flex-tab .channel-settings .button:hover,.flex-tab .channel-settings .buttons .button:hover{background-color:#26282c;color:#c2c2c2}.emoji-top .emoji-filter .search,.flex-tab .channel-settings .editing,.rc-input__element,.rc-old #login-card .input-line input,.rc-old #login-card .input-line select,.rc-old input[type=email],.rc-old input[type=number],.rc-old input[type=password],.rc-old input[type=text],.rc-old input[type=url],.rc-old select,.rc-tags,input,select,textarea{background-color:#303337;border:2px solid #505257;border-radius:2px!important}.emoji-top .emoji-filter .search:focus,.flex-tab .channel-settings .editing:focus,.rc-input__element:focus,.rc-old #login-card .input-line input:focus,.rc-old #login-card .input-line select:focus,.rc-old input[type=email]:focus,.rc-old input[type=number]:focus,.rc-old input[type=password]:focus,.rc-old input[type=text]:focus,.rc-old input[type=url]:focus,.rc-old select:focus,.rc-tags:focus,input:focus,select:focus,textarea:focus{border-color:#565d71!important}.emoji-top .emoji-filter .search[disabled],.flex-tab .channel-settings .editing[disabled],.rc-input__element[disabled],.rc-old #login-card .input-line input[disabled],.rc-old #login-card .input-line select[disabled],.rc-old input[type=email][disabled],.rc-old input[type=number][disabled],.rc-old input[type=password][disabled],.rc-old input[type=text][disabled],.rc-old input[type=url][disabled],.rc-old select[disabled],.rc-tags[disabled],input[disabled],select[disabled],textarea[disabled]{background-color:#43474d;border-color:#606369}.rc-input__element,.toolbar .rc-input__element,input,select,textarea{color:#b8b9bb}.message.new-day::before{background-color:#36393e;color:#727477}.message.new-day::after{border-color:#3e4045}.flex-tab .message.new-day::before{background-color:#2f3136;color:#4e4f54}.flex-tab .message.new-day::after{border-color:#37393e}.rc-old .list-view.uploaded-files-list .file-name{color:#7289da;border-bottom-color:#393b41}.rc-old .list-view.uploaded-files-list .file-name:hover{color:#8095de;text-decoration:none}.flex-tab a i,.flex-tab a[class^=icon-],.message a i,.message a[class^=icon-]{color:#686d78}.flex-tab a i:hover,.flex-tab a[class^=icon-]:hover,.message a i:hover,.message a[class^=icon-]:hover{color:#7c818d}.rc-old .code-colors,code{background-color:#2a2c31;border-color:#282a2f;border-radius:2px;color:#c2c3c5;font-weight:400}.filter-item{border-color:#838383}.filter-item .category-link{color:#838383}.filter-item:hover{border-color:#a8a8a8}.filter-item:hover .category-link{color:#a8a8a8}.filter-item.active{border-color:#7289da}.filter-item.active .category-link{color:#7289da}.emoji-picker .emojis .emoji-list li:hover{background-color:#222327}.rc-old .message{margin-top:40px}.rc-old .message .message-actions{bottom:4px;top:auto}.rc-old .message::after{border-top:1px solid #3f4349;content:" ";display:block;left:0;pointer-events:none;position:absolute;top:-20px;width:100%}.rc-old .message.sequential{padding-top:0;margin-top:0}.rc-old .message.sequential::after{display:none}.rc-old .message.sequential .message-actions{bottom:auto;top:0}.rc-old .message.first-unread .body::before{background-color:#7289da;top:-20px}.rc-old .message.first-unread .body::after{background-color:#36393e;color:#7289da;top:-25px}.rc-old .message.first-unread.sequential{margin-top:10px}.rc-old .message.first-unread.sequential .body::before{top:-6px}.rc-old .message.first-unread.sequential .body::after{top:-12px}.rc-old .message.first-unread.new-day::before{color:#7289da}.rc-old .message.first-unread.new-day::after{border-color:#7289da}.rc-old .compact .message{min-height:0;padding-top:2px;padding-bottom:2px}.rc-old .compact .message .message-actions{bottom:0}.message .reactions>li{background-color:#2a2c31;border-color:#2a2c31;color:#7289da}.message .reactions>li.selected{background-color:#2a2c31;background-color:#7289da;border-color:#7289da;color:#fff}.message .reactions>li.add-reaction{border:none}.input.checkbox.toggle label:before,.rc-switch--blue .rc-switch__button,.rc-switch__button{background-color:#bbb;border-color:#bbb}.flex-nav .input.checkbox.toggle input:checked+label:before,.input.checkbox.toggle input:checked+label:before,.rc-switch--blue .rc-switch__input:checked+.rc-switch__button,.rc-switch__input:checked+.rc-switch__button{background-color:#7289da;border-color:#7289da}.rc-old .list-view>.title .see-all{text-decoration:none}.rc-old .list-view>.title .see-all:hover{text-decoration:underline}.upload-progress .upload-progress-progress{background-color:#7289da}.upload-progress .upload-progress-text{color:#42495d}.upload-progress button{color:#42495d}.upload-progress button:hover{color:#fff}.rc-modal{background-color:#2a2c31}.rc-modal__footer{background-color:#26282c}.sweet-alert{background-color:#2a2c31}.sweet-alert h2,.sweet-alert p{color:#bbb}.sweet-alert input{border-color:#323439;color:#bbb;background-color:#26282c}.sweet-alert input:focus{border-color:#565d71;-webkit-box-shadow:none;box-shadow:none;color:#eee}.sweet-alert .sa-icon.sa-success::after,.sweet-alert .sa-icon.sa-success::before,.sweet-alert background-color darken(component-bg,.sweet-alert10%){background-color:#2a2c31}.sweet-alert .sa-icon.sa-success .sa-fix{background-color:#2a2c31}.sweet-alert button.confirm{background-color:#7289da!important;color:#e2e7f7!important}.sweet-alert button.confirm:hover{color:#e2e7f7!important;background-color:#5873d3!important}.sweet-alert button.cancel{background-color:#bbb;color:#2a2c31}.sweet-alert button.cancel:hover{background-color:#a8a8a8}.message.editing,.messages-box.selectable .selected,.rc-message-box__container.editing{background-color:#3c414d}.preferences-page__header{border-bottom:1px solid #313338;-webkit-box-shadow:none;box-shadow:none;color:#c2c3c5}.rc-form-label,.rc-form-legend{color:#c2c3c5}.rc-switch__text{color:#c2c3c5}.rc-popup-list__item.selected .rc-popup-list__item-name,.rc-popup-list__item:hover .rc-popup-list__item-name{color:#fff}.message-popup{background-color:#2a2c31}.rc-old .message-popup-title{font-weight:700}.rc-old .popup-item.selected{background-color:#7289da}.rc-room-actions{color:var(--color-darkest)}.sidebar-item__menu-icon{fill:currentColor}.rc-input__icon,.rc-message-box .rc-icon,.rc-message-box__toolbar-markdown-link{color:#7c7e81}.rc-input__icon:hover,.rc-message-box .rc-icon:hover,.rc-message-box__toolbar-markdown-link:hover{color:#96989a;fill:#96989a}.contextual-bar .rc-popup-list__list{background-color:#2a2c31}@media (max-width:500px){.rc-message-box{margin-top:0}.rc-message-box__container{border:none}}.flex-tab .channel-settings .buttons{bottom:1px;top:0}.flex-tab .channel-settings .buttons .button{padding:7px}.rc-old #login-card .input-line .input-error{color:#f04747}.burger i{background-color:#c2c3c5}.unread-bar,.unread-bar button{color:#fff}.unread-bar button:hover{color:#e2e7f7}.rc-old .announcement{background-color:#7289da}.rc-user-info__row--separator{border-color:#44474e;margin-bottom:4px}.rc-select{border-color:#505257;cursor:pointer}.rc-select select{border:none}.rc-popover__item-radio:checked+.rc-popover__item-radio-label,.rc-user-info__config-value{color:#7289da}.rc-popover__item-radio-label::after{background-color:#7289da}.rc-user-info__config-content-icon,.rc-user-info__config-name{color:#bbb}.rc-old .flex-tab-container .flex-tab .content .section{background-color:#2a2c31;border:none;color:#bbb}.contextual-bar__content .section hr,.rc-old .flex-tab-container .flex-tab .content .section hr{background-color:#313338;border:none;height:1px}.contextual-bar__content .section kbd,.rc-old .flex-tab-container .flex-tab .content .section kbd{background-color:#26272b;padding:2px}.rc-member-list__user.active,.rc-member-list__user:hover{background-color:#353946}.rc-member-list__counter{color:#bbb}.rc-user-info__scroll .rc-switch-double__label.disabled{color:#595a5d}.rc-user-info__scroll .rc-switch-double__label{color:#bbb}.channel-settings .rc-switch-double__label{color:#595a5d}.channel-settings .rc-switch-double__label.disabled{color:#bbb}.attachments__name{color:#c2c3c5}.attachments__item:hover{background-color:#2a2c31}.rc-table{color:#c2c3c5}.rc-table-body .rc-table-tr:hover{background-color:#2a2c31}.message .info .is-bot,.message .info .role-tag{background-color:#7289da;color:#fff}.message .body>table tr{border-top-color:#24252a;background-color:#2a2c31}.message .body>table tr{background-color:#2a2c31}.message .body>table tr:nth-child(2n){background-color:#282a2f}.message .body>table tr td,.message .body>table tr th{border-color:#24252a}.rc-old .page-container table,.rc-old .page-settings .section{background-color:#2a2c31}.rc-old .page-settings .section{border:none}.rc-old .page-container table{margin-top:10px}.rc-old .page-container table .admin-table-row,.rc-old .page-container table th{background-color:transparent}.rc-old .page-container table th{border-bottom:1px solid #27282d}.rc-old .page-container table tr:hover th{background-color:#27282d}.rc-old .page-container table tr:hover td{background-color:#25262b}.rc-old .page-container table thead td,.rc-old .page-container table thead th{background-color:transparent!important}:root:root{--flex-nav-background:#2f3136;--sidebar-background-light:#2f3136;--sidebar-background-light-hover:#282a2e}.sidebar-light .sidebar-item{color:#bbb}.sidebar-flex__search .rc-input__element{background-color:#26272b;color:#b8b9bb}.page-container a:not(.button):not(.rc-button){color:#7289da!important}.page-container a:not(.button):not(.rc-button):hover{color:#5873d3!important}.page-list a.button,.page-settings a.button{color:#e2e7f7}.page-list a.button:hover,.page-settings a.button:hover{color:#e2e7f7}.rc-old .page-settings .section-content .input-line{border-color:#3d4048}.rc-old .fixed-title,.rc-old .page-list .results{border-color:#313338}.pending-background{background-color:transparent;border:none}.rc-old .page-static .content .section .section-content{background-color:#2a2c31}.range-slider-range{background-color:#36383d;border-color:#36383d}.range-slider-range::-webkit-slider-thumb{background-color:#7289da}.range-slider-range::-webkit-slider-thumb:active,.range-slider-range::-webkit-slider-thumb:hover{background-color:#5873d3}.range-slider-range::-moz-range-thumb{background-color:#7289da}.range-slider-range::-moz-range-thumb:active,.range-slider-range::-moz-range-thumb:hover{background-color:#5873d3}.range-slider-value{background-color:#7289da}.range-slider-value:after{border-right-color:#7289da}.admin-integrations-new-panel .admin-integrations-new-item{border-color:#313338;color:#bbb}.admin-integrations-new-panel .admin-integrations-new-item:hover{background-color:#27282d}.rc-old .page-settings .section .message.new-day::before{background-color:#2a2c31}.rc-old .page-settings .section .attachment-block-border{background-color:#7289da!important}.rc-old .page-container .content .rocket-form fieldset small{color:#c2c3c5}.input-line.setting-changed>label{color:#7289da}.rc-old .select-arrow{color:#bbb}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:rgba(0,0,0,.05)!important}::-webkit-scrollbar-thumb{background-color:#2a2c31}.CodeMirror.CodeMirror{background:#151515;color:#e0e0e0}.CodeMirror.CodeMirror div.CodeMirror-selected{background:#303030}.CodeMirror.CodeMirror .CodeMirror-line::-moz-selection,.CodeMirror.CodeMirror .CodeMirror-line>span::-moz-selection,.CodeMirror.CodeMirror .CodeMirror-line>span>span::-moz-selection{background:rgba(48,48,48,.99)}.CodeMirror.CodeMirror .CodeMirror-line::selection,.CodeMirror.CodeMirror .CodeMirror-line>span::selection,.CodeMirror.CodeMirror .CodeMirror-line>span>span::selection{background:rgba(48,48,48,.99)}.CodeMirror.CodeMirror .CodeMirror-line::-moz-selection,.CodeMirror.CodeMirror .CodeMirror-line>span::-moz-selection,.CodeMirror.CodeMirror .CodeMirror-line>span>span::-moz-selection{background:rgba(48,48,48,.99)}.CodeMirror.CodeMirror .CodeMirror-gutters{background:#151515;border-right:0}.CodeMirror.CodeMirror .CodeMirror-guttermarker{color:#ac4142}.CodeMirror.CodeMirror .CodeMirror-guttermarker-subtle{color:#505050}.CodeMirror.CodeMirror .CodeMirror-linenumber{color:#505050}.CodeMirror.CodeMirror .CodeMirror-cursor{border-left:1px solid #b0b0b0!important}.CodeMirror.CodeMirror span.cm-comment{color:#8f5536}.CodeMirror.CodeMirror span.cm-atom{color:#aa759f}.CodeMirror.CodeMirror span.cm-number{color:#aa759f}.CodeMirror.CodeMirror span.cm-attribute,.CodeMirror.CodeMirror span.cm-property{color:#90a959}.CodeMirror.CodeMirror span.cm-keyword{color:#ac4142}.CodeMirror.CodeMirror span.cm-string{color:#f4bf75}.CodeMirror.CodeMirror span.cm-variable{color:#90a959}.CodeMirror.CodeMirror span.cm-variable-2{color:#6a9fb5}.CodeMirror.CodeMirror span.cm-def{color:#d28445}.CodeMirror.CodeMirror span.cm-bracket{color:#e0e0e0}.CodeMirror.CodeMirror span.cm-tag{color:#ac4142}.CodeMirror.CodeMirror span.cm-link{color:#aa759f}.CodeMirror.CodeMirror span.cm-error{background:#ac4142;color:#b0b0b0}.CodeMirror.CodeMirror .CodeMirror-activeline-background{background:#202020}.CodeMirror.CodeMirror .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.CodeMirror.CodeMirror .cm-builtin,.CodeMirror.CodeMirror span.cm-qualifier{color:#d28445}.CodeMirror.CodeMirror .cm-meta,.CodeMirror.CodeMirror .cm-type,.CodeMirror.CodeMirror .cm-variable-3{color:#9cdcfe}.rc-old .page-settings .section-content:nth-child(2){padding-top:0!important}.rc-old .page-settings .section-content>.button{margin-top:20px}.rc-old .page-static .content .section h1{margin-top:0;padding-left:0}.input-line textarea{width:100%}.rc-old .page-settings .content .rocket-form .submit{margin-right:20px}.permissions-manager>a,.rc-old .page-settings .content>a{margin-left:20px}.rc-old .page-settings .section-content .flex-grow-1+.color-editor>select{border-left:none;cursor:pointer}.rc-old .page-settings .section-content .flex-grow-1>input{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.sidebar-light .sidebar-item__picture .avatar{-webkit-box-shadow:none;box-shadow:none}.page-list a.button{margin-left:0}.code-colors.hljs,.hljs{display:block;overflow-x:auto;padding:.5em;color:#abb2bf;background:#282c34}.hljs .hljs-comment,.hljs .hljs-quote{color:#5c6370;font-style:italic}.hljs .hljs-doctag,.hljs .hljs-formula,.hljs .hljs-keyword{color:#c678dd}.hljs .hljs-deletion,.hljs .hljs-name,.hljs .hljs-section,.hljs .hljs-selector-tag,.hljs .hljs-subst{color:#e06c75}.hljs .hljs-literal{color:#56b6c2}.hljs .hljs-addition,.hljs .hljs-attribute,.hljs .hljs-meta-string,.hljs .hljs-regexp,.hljs .hljs-string{color:#98c379}.hljs .hljs-built_in,.hljs .hljs-class .hljs-title{color:#e6c07b}.hljs .hljs-attr,.hljs .hljs-number,.hljs .hljs-selector-attr,.hljs .hljs-selector-class,.hljs .hljs-selector-pseudo,.hljs .hljs-template-variable,.hljs .hljs-type,.hljs .hljs-variable{color:#d19a66}.hljs .hljs-bullet,.hljs .hljs-link,.hljs .hljs-meta,.hljs .hljs-selector-id,.hljs .hljs-symbol,.hljs .hljs-title{color:#61aeee}.hljs .hljs-emphasis{font-style:italic}.hljs .hljs-strong{font-weight:700}.hljs .hljs-link{text-decoration:underline}:root:root{--rooms-list-title-text-size:0.85rem;--popover-padding:10px 0}.rooms-list__type{padding-bottom:5px}.rooms-list__type .badge{margin-left:5px}.sidebar-item__menu{display:block;opacity:0;-webkit-transition:all .3s;transition:all .3s}.sidebar-item:hover .sidebar-item__menu{opacity:1}.rc-old .list-view>.title p{margin-top:10px}.rc-old .buttons-group{margin-bottom:10px;margin-top:10px}.rc-tags{padding-left:2rem}.rc-tags .rc-tags__tag:first-child{margin-left:1rem}.rc-tags--no-icon{padding:0}.messages-box ul{padding-bottom:20px}.rc-old #login-card .submit{margin-bottom:12px}.rc-old #login-card .back-to-login,.rc-old #login-card .forgot-password{margin-top:4px}.rc-old #login-card .input-line label{margin-left:0}.rc-old #login-card .input-line .input-error{font-size:.9em;margin-top:3px;padding-left:0}.upload-progress-progress{z-index:999}.messages-box .start{margin-top:0;padding:20px 0}.contextual-bar__content{padding-top:0}.rc-tags__input{border:none!important;margin:0!important}.rc-old .list-view>.title>p{margin-top:0!important}.rc-popover__item,.rc-popover__title{padding-left:16px;padding-right:16px}.rc-popover__title{margin-top:6px}.rc-popover__item:hover{background-color:#26282c}.rc-popover__divider{margin:.5em 0}.rc-old .flex-tab-container .flex-tab .content .section{margin:5px 20px}.rc-header__block,.rc-header__name{font-size:1.25rem}.rc-old .popup-user-avatar{height:18px;margin:-4px 4px;width:18px}.reply-preview{background-color:#2a2c31!important}.reply-preview .message{margin-top:0} | |
`, | |
_sleep: function (ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
}, | |
createCookie: function (name, value, days) { | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
var expires = "; expires="+date.toGMTString(); | |
} | |
else var expires = ""; | |
document.cookie = name+"="+value+expires+";path=/"; | |
}, | |
getCookie: function (cname) { | |
var name = cname + "="; | |
var ca = document.cookie.split(';'); | |
for(var i = 0; i < ca.length; i++) { | |
var c = ca[i]; | |
while (c.charAt(0) == ' ') { | |
c = c.substring(1); | |
} | |
if (c.indexOf(name) == 0) { | |
return c.substring(name.length, c.length); | |
} | |
} | |
return null; | |
}, | |
eraseCookie: function (name) { | |
this.createCookie(name,"",-1); | |
} | |
} | |
$( function() { | |
ThemeEnabler.onAppLoaded() | |
}); | |
// console.log("Custom script executed..."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't look like that. Try force-reloading the page.