feat: Let me try releasing next to NPM as well · feildmaster/UnderScript@967dda9 · GitHub
Skip to content

Commit 967dda9

Browse files
committed
feat: Let me try releasing next to NPM as well
I've tried it before and it bugged... but hopefully now it will work just fine? :D
1 parent 6b23c9f commit 967dda9

3 files changed

Lines changed: 20 additions & 11 deletions

File tree

.travis.yml

Lines changed: 7 additions & 0 deletions

src/base/indexLayout.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ settings.register({
66

77
onPage('', function adjustSpectateView() {
88
if (settings.value('underscript.disable.adjustSpectateView')) return;
9-
const spectate = $('.spectateTable');
10-
const tbody = $('.spectateTable tbody');
11-
const footer = $('.mainContent footer');
12-
function doAdjustment() {
13-
tbody.css({height: 'auto', 'max-height': `${footer.offset().top - spectate.offset().top}px`});
14-
}
15-
$('.mainContent > br').remove();
16-
doAdjustment();
17-
$(window).on('resize.script', doAdjustment);
9+
eventManager.on('jQuery', () => {
10+
const spectate = $('.spectateTable');
11+
const tbody = $('.spectateTable tbody');
12+
const footer = $('.mainContent footer');
13+
function doAdjustment() {
14+
tbody.css({height: 'auto', 'max-height': `${footer.offset().top - spectate.offset().top}px`});
15+
}
16+
$('.mainContent > br').remove();
17+
doAdjustment();
18+
$(window).on('resize.script', doAdjustment);
19+
});
1820
});

src/utils/settings.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)