Skip to content

Commit

Permalink
Pinned Guild Messages - show links (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatApo committed Jul 5, 2022
1 parent 521cbfd commit 37f97a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions source/core/resources/style_gca.css
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,10 @@
.gca_messages_styling .message_box:hover .message_box_content .message_text.gca_message_links{border-top: 1px solid #7D714A;}
.gca_messages_styling .message_box .message_box_content .message_text.gca_message_links a:hover{text-shadow: 0px 0px 1px rgba(97, 45, 4, 0.3);}
.gca_rtl.gca_messages_styling .message_box .messageSubject .message_box_title .message_title span{margin-left: auto;margin-right: 5px;}

.gca_messages_pinned_message .gca_message_links{font-size: 10px;font-style: italic;border-width: 0px 1px 1px 1px;border-style: solid; border-color: #bba86e;margin-top: 0px;background-color: rgba(211, 193, 149, 0.5);padding-top: 0px;}
.gca_messages_pinned_message .gca_message_links:hover{border-width: 0px 1px 1px 1px;border-style: solid; border-color: #7D714A;}
.gca_messages_pinned_message .gca_message_links a:hover{text-shadow: 0px 0px 1px rgba(97, 45, 4, 0.3);}

/* Messages Guild Report */
.gca_messages_styling .gca_messages_guild_report .messageSubject,
Expand Down
9 changes: 8 additions & 1 deletion source/core/source/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,10 @@ var gca_messages = {
}

// Add box on message
message.body.parentNode.appendChild(wrapper);
if(message.body.className=="message_pinned_title") // if pinned message
message.body.parentNode.parentNode.parentNode.appendChild(wrapper);
else // normal message
message.body.parentNode.appendChild(wrapper);
},

showPinned : function(){
Expand Down Expand Up @@ -536,6 +539,10 @@ var gca_messages = {
// Add tooltip
let tooltip = [[[gca_locale.get('guild', 'pinned_message'), 'white']]];
gca_tools.setTooltip(pinned_message_container, JSON.stringify(tooltip));

// Check for links
if(gca_options.bool("messages", "show_message_links"))
gca_messages.guild_message.parse_links({body:message_title});
}
},

Expand Down

0 comments on commit 37f97a3

Please sign in to comment.