Skip to content

Commit

Permalink
Added Some ScoreDB links #149
Browse files Browse the repository at this point in the history
  • Loading branch information
outoftheline committed Jun 20, 2021
1 parent 16c0735 commit 45316a1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
9 changes: 9 additions & 0 deletions js/web/eventhandler/css/eventhandler.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
text-align: center;
}

#moppelhelper #moppelhelperBody td a {
color: var(--text-bright);
text-decoration: none;
}

#moppelhelper #moppelhelperBody td a:hover {
text-decoration: underline;
}

#moppelhelper #moppelhelperBody .dropdown span.arrow {
top: 14px;
right: 8px;
Expand Down
4 changes: 3 additions & 1 deletion js/web/eventhandler/js/eventhandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ let EventHandler = {

h.push(`<td><img style="max-width: 22px" src="${MainParser.InnoCDN + 'assets/shared/avatars/' + MainParser.PlayerPortraits[Player['Avatar']]}.jpg" alt="${Player['PlayerName']}"></td>`);

h.push('<td style="white-space:nowrap" data-text="' + Player['PlayerName'].toLowerCase().replace(/[\W_ ]+/g, "") + '">' + Player['PlayerName'] + '</td>');
h.push('<td style="white-space:nowrap;text-align:left;" data-text="' + Player['PlayerName'].toLowerCase().replace(/[\W_ ]+/g, "") + '">');
let world = localStorage.getItem('current_world');
h.push('<a href="https://foe.scoredb.io/' + world + '/player/' + Player['PlayerID'] + '" target="_blank">' + Player['PlayerName'] + '</a></td>');

h.push('<td class="is-number" data-number="' + Player['Score'] + '">' + HTML.Format(Player['Score']) + '</td>');

Expand Down
9 changes: 9 additions & 0 deletions js/web/infoboard/css/infoboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
background-color: transparent;
}

.info-table a {
text-decoration: none;
color: inherit;
}

.info-table a:hover {
text-decoration: underline;
}

table.info-table:not(.no-hover) tbody tr:hover {
background-color: var(--background-table-hover) !important;
}
Expand Down
5 changes: 4 additions & 1 deletion js/web/infoboard/js/infoboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ let Infoboard = {
DebugWebSocket: false,
History: [],
MaxEntries: 0,
World = localStorage.getItem('current_world'),


/**
Expand Down Expand Up @@ -396,6 +397,7 @@ let Info = {
* @returns {class: 'message', msg: string, type: string, img: string | undefined}
*/
ConversationService_getNewMessage: (d) => {
console.log(d);
let chat = MainParser.Conversations.find(obj => obj.id === d['conversationId']),
header, message, image;

Expand Down Expand Up @@ -446,7 +448,8 @@ let Info = {
header = '<div><strong class="bright">' + chat['escaped_title'] + '</strong></div>';
}
else {
header = '<div><strong class="bright">' + chat['escaped_title'] + '</strong> - <em>' + d['sender']['name'] + '</em></div>';
let link = 'https://foe.scoredb.io/' + Infoboard.World + '/player/' + d['sender']['player_id'];
header = '<div><strong class="bright">' + chat['escaped_title'] + '</strong> - <em><a href="' + link + '" target="_blank">' + d['sender']['name'] + '</a></em></div>';
}
}
else {
Expand Down

0 comments on commit 45316a1

Please sign in to comment.