From 786b5c3c8c44b1b4e5884d30bab5ed8006376d62 Mon Sep 17 00:00:00 2001 From: 12px Date: Tue, 6 Apr 2021 14:58:11 -0600 Subject: [PATCH 1/8] Style profile border. --- styles/_style.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/_style.sass b/styles/_style.sass index 3215b8e..7fb3946 100644 --- a/styles/_style.sass +++ b/styles/_style.sass @@ -2,6 +2,7 @@ $accent-text: mix(#ffffff, $accent, 40%) !default $bg-gradient: linear-gradient(to bottom, $accent, darken($accent, 10%)) !default #ts_slider, +.overlay .modal, .score.scoregood, #settings .option.selected, .floating-menu .option.active, From 39a45f635baf2cf76188c13c116f453638902039 Mon Sep 17 00:00:00 2001 From: 12px Date: Tue, 6 Apr 2021 15:05:43 -0600 Subject: [PATCH 2/8] Add styling to more profile, lobby items. --- styles/_style.sass | 7 ++++++- themes/base/_panels.sass | 2 ++ themes/base/_popups.sass | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/styles/_style.sass b/styles/_style.sass index 7fb3946..0543366 100644 --- a/styles/_style.sass +++ b/styles/_style.sass @@ -18,6 +18,8 @@ $bg-gradient: linear-gradient(to bottom, $accent, darken($accent, 10%)) !default #pmWindows a, #ts_window h4, #topBG #content a, +#myInfo .myName:hover, +#myInfo .myFans:hover, .current-song .details, #ts_window .ts_credits a, .lobby-panel .buddyRoomName, @@ -26,7 +28,9 @@ $bg-gradient: linear-gradient(to bottom, $accent, darken($accent, 10%)) !default #ts_window input:checked:after, .tab-item:not(.selected):hover .tab-title, .chat .message:not(.stat) .subject:hover, -.chat .message:not(.stat) .speaker:hover +.chat .message:not(.stat) .speaker:hover, +.fans .stat-number:not(.disabled):hover, +.fanofs .stat-number:not(.disabled):hover color: $accent-text !important .chat .message.mention @@ -58,6 +62,7 @@ $bg-gradient: linear-gradient(to bottom, $accent, darken($accent, 10%)) !default filter: $grayed #create-room, +.modal .title, #buddyListHeader, .tab-item:active, .tab-item.selected, diff --git a/themes/base/_panels.sass b/themes/base/_panels.sass index 28bdd63..ea79f6c 100644 --- a/themes/base/_panels.sass +++ b/themes/base/_panels.sass @@ -84,7 +84,9 @@ left: 36px #chat-input, +.overlay textarea, #song-search-input, +.overlay input.text, .room-search-input input @extend %text-input &::placeholder diff --git a/themes/base/_popups.sass b/themes/base/_popups.sass index b515482..72dc236 100644 --- a/themes/base/_popups.sass +++ b/themes/base/_popups.sass @@ -65,6 +65,8 @@ .overlay .modal background: $active-tab-bg !important + .title + color: $active-tab-text !important .content-container background: $bg-main !important .content From f968aa68b994071d0ae3e31dbe728da418215bdc Mon Sep 17 00:00:00 2001 From: 12px Date: Tue, 6 Apr 2021 15:30:00 -0600 Subject: [PATCH 3/8] Add ttStats link to profiles. --- scripts/modify.js | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/scripts/modify.js b/scripts/modify.js index 2907cc8..a395bcd 100644 --- a/scripts/modify.js +++ b/scripts/modify.js @@ -4,9 +4,12 @@ module.exports = tS => { tS.modify = function () { // bind song count updates - $('#songs-wrapper').on('DOMSubtreeModified', '#songs', countSongs) + $('#songs-wrapper').on(event, '#songs', countSongs) countSongs() + // bind profile stat link updates + $('#maindiv').on(event, '.overlay', attachStats) + // hide the audience/video this.toggleClass('ts_hide_videos', this.config.no_vid) this.toggleClass('ts_hide_audience', this.config.no_aud) @@ -31,9 +34,30 @@ module.exports = tS => { } +const event = 'DOMSubtreeModified' + const countSongs = () => { let head = $('#playlist-header .text')[0] let data = window.turntable.playlist.fileids.length let name = head.innerHTML.split('')[0] head.innerHTML = `${name} ${data}` -} \ No newline at end of file +} + +const attachStats = () => { + let el = $('.profile.modal .userid') + let id = el.length ? el[0].innerHTML : '' + if (id.length != 24) return + + if ($('.profile.modal .statslink').length) return + $('.profile.modal .section.about').before(layout(id)) + + console.log(id) +} + +const layout = id => ` +