Skip to content

Instantly share code, notes, and snippets.

@GTHBNLK
Last active June 4, 2020 00:09
Show Gist options
  • Save GTHBNLK/491f22242a9c09c4d0ae7f34037645d4 to your computer and use it in GitHub Desktop.
Save GTHBNLK/491f22242a9c09c4d0ae7f34037645d4 to your computer and use it in GitHub Desktop.
Styles: Upwork.com Message Centre NEW
// ==UserScript==
// @name Styles: Upwork.com Message Centre NEW
// @version 0.1.6
// @description Clear some of the elements from the message center of Upwork.com website.
// @author GHNalk2016
// @include *://*.upwork.com/messages/rooms/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant GM_addStyle
// @updateURL https://gist.githubusercontent.com/GHNalk2016/491f22242a9c09c4d0ae7f34037645d4/raw/main.meta.js
// @downloadURL https://gist.githubusercontent.com/GHNalk2016/491f22242a9c09c4d0ae7f34037645d4/raw/main.user.js
// ==/UserScript==
// ==UserScript==
// @name Styles: Upwork.com Message Centre NEW
// @version 0.1.6
// @description Clear some of the elements from the message center of Upwork.com website.
// @author GHNalk2016
// @include *://*.upwork.com/messages/rooms/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant GM_addStyle
// @updateURL https://gist.githubusercontent.com/GHNalk2016/491f22242a9c09c4d0ae7f34037645d4/raw/main.meta.js
// @downloadURL https://gist.githubusercontent.com/GHNalk2016/491f22242a9c09c4d0ae7f34037645d4/raw/main.user.js
// ==/UserScript==
// On/off each element by activating/deactivating each line of code in this section.
addGlobalStyle('.header-navbar-skinny { display: none; }'); // On/off main header.
//addGlobalStyle('#chat-header { display: none; }'); // On/off chat header.
addGlobalStyle('#chat-header #room-chat-nav { display: none; }'); // On/off story panel header buttons.
addGlobalStyle('#story-box .room-timestamp.contextual-room-timestamp { display: none; }'); // On/off story panel contextual timestamp.
addGlobalStyle('#story-box .composer-panel { display: none; }'); // On/off composer panel.
addGlobalStyle('.story-attachment-url { display: none; }'); // On/off attachment urls.
// ------------------------------------------------------------------------------------------------
// Composer panel modifications.
addGlobalStyle('.msg-composer-maxheight { max-height: 100% !important; }');
addGlobalStyle('.msg-composer-input { height: 60px !important; }');
// ------------------------------------------------------------------------------------------------
// Other modifications.
//addGlobalStyle('.main-container .fill { height: 655px; }');
//addGlobalStyle('.story-panel { height: 545px !important; }');
addGlobalStyle('#room-nav.main-body-col, .room-body { height: auto; }');
// For the new error.
addGlobalStyle( '#story-box { visibility: hidden !important; }');
setTimeout(function() {
addGlobalStyle( '.story-panel { height: auto !important; top: 0px !important; }');
}, 3000);
setTimeout(function() {
addGlobalStyle( '#story-box { visibility: visible !important; }');
}, 10000);
// ---
// ------------------------------------------------------------------------------------------------
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment