feat: Click on stale hovered cards to remove them · feildmaster/UnderScript@5b1794c · GitHub
Skip to content

Commit 5b1794c

Browse files
committed
feat: Click on stale hovered cards to remove them
1 parent 37a3475 commit 5b1794c

4 files changed

Lines changed: 34 additions & 4 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions

src/base/vanilla/cardHover.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
wrap(function hoverWrapper() {
2+
function wrapper(...rest) {
3+
this.super(...rest);
4+
$('#hover-card').click(function () {
5+
$(this).remove();
6+
});
7+
}
8+
9+
eventManager.on(':loaded', () => {
10+
const options = {
11+
throws: false,
12+
};
13+
globalSet('displayCardDeck', wrapper, options);
14+
globalSet('displayCardHelp', wrapper, options);
15+
});
16+
});

src/utils/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function debug(message, permission = 'debugging') {
22
if (!settings.value(permission) && !settings.value('debugging.*')) return;
33
//message.stack = new Error().stack.split('\n').slice(2);
4-
console.log(message);
4+
console.log(`[${permission}]`, message);
55
}
66

77
fn.debug = (arg, permission = 'debugging') => {

src/utils/global.js

Lines changed: 16 additions & 3 deletions

0 commit comments

Comments
 (0)