Skip to content

Commit 7feccb1

Browse files
committed
chore: reverse some settings to be "disabled" rather than "enabled" when checked
1 parent 26e5c0e commit 7feccb1

File tree

10 files changed

+40
-42
lines changed

10 files changed

+40
-42
lines changed

lang/en/settings.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"announce": "Announcement",
33
"announce.friendsOnly": "Friends Only",
44
"announce.notSelf": "Ignore Self",
5-
"autocomplete": "Visual Autocomplete",
5+
"autocomplete": "Disable Autocomplete",
66
"autocomplete.friends": "Autocomplete: Online Friends Only",
77
"broadcast": "Disable Broadcast Toast",
88
"card.name.english": "Force English for card names",
@@ -63,13 +63,13 @@
6363
],
6464
"fishday": "Disable April Fools Jokes",
6565
"fishday.note": "Disables *almost* everything.",
66-
"friend.add": "Add friends without refreshing",
66+
"friend.add": "Disable adding friends without refreshing",
6767
"friend.auto": "Disable",
6868
"friend.auto.ignore": "Include ignored chat users",
6969
"friend.auto.silent": "Silent",
7070
"friend.background": "Remove friends without refreshing",
7171
"friend.decline": "Disable decline all button",
72-
"friend.online": "Enable online friends",
72+
"friend.online": "Disable online friends",
7373
"friend.request": "Disable Friend Request Notifications",
7474
"friendship": "Disable Collect All",
7575
"friendship.notification": "Disable Friendship Notification",
@@ -88,12 +88,12 @@
8888
"import.shiny": "Prefer Shiny",
8989
"key.any": "Press Any Key...",
9090
"key.bind": "Click to bind",
91-
"large.avatar": "Large Icon mode",
91+
"large.avatar": "Disable Large Icon mode",
9292
"library.scrollwheel": "Disable Scrolling Collection with Mousewheel",
93-
"links": "Use Original Link Detection",
93+
"links": "Disable Improved Link Detection",
9494
"map.duplicate": "Duplicate value, not updated! Click here to reset.",
9595
"minigame": "Disable",
96-
"minigame.wasd": "Use WASD",
96+
"minigame.keys": "Disable WASD",
9797
"note.refresh": "Will require you to refresh the page.",
9898
"page.chat": "Chat",
9999
"page.friends": "Friends",
@@ -105,9 +105,9 @@
105105
"ping": "Disable Chat Ping {{STYLE:highlight|(highlighting)}}",
106106
"ping.global": "Only open chats",
107107
"ping.on": "On",
108-
"ping.toast": "Enable ping toasts",
108+
"ping.toast": "Disable ping toasts",
109109
"quest.highlight": "Disable Quest Highlight",
110-
"safelink": "Enabled",
110+
"safelink": "Disabled",
111111
"safelink.trust": "Trust $1",
112112
"skins.basic": "Force Basic Card Skins",
113113
"skins.breaking": "Breaking Card Art Behavior",
@@ -125,11 +125,11 @@
125125
"No"
126126
],
127127
"title": "UnderScript Configuration",
128-
"toast.bundle": "Enable bundle toast",
129-
"toast.cards": "Enable new Card toast",
130-
"toast.emotes": "Enable emote toast",
131-
"toast.pass": "Enable quest pass toast",
132-
"toast.skins": "Enable skin toast",
128+
"toast.bundle": "Disable bundle toast",
129+
"toast.cards": "Disable new Card toast",
130+
"toast.emotes": "Disable emote toast",
131+
"toast.pass": "Disable quest pass toast",
132+
"toast.skins": "Disable skin toast",
133133
"update": "Disable Auto Updates",
134134
"update.frequency": "Update Frequency",
135135
"update.frequency.option": [

src/base/chat/autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Translation from 'src/structures/constants/translation.js';
99
const setting = settings.register({
1010
name: Translation.Setting('autocomplete'),
1111
key: 'underscript.autocomplete',
12-
default: true,
12+
data: { reverse: true },
1313
page: 'Chat',
1414
});
1515

src/base/chat/largeIconMode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import style from 'src/utils/style.js';
88
const setting = settings.register({
99
name: Translation.Setting('large.avatar'),
1010
key: 'underscript.chat.largeIcons',
11-
default: true,
11+
data: { reverse: true },
1212
page: 'Chat',
1313
onChange: update,
1414
});

src/base/chat/tag.friend.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ import { infoToast } from 'src/utils/2.toasts.js';
55
import style from 'src/utils/style.js';
66

77
const tag = settings.register({
8+
// TODO: Translation
89
name: 'Highlight <span class="friend">friends</span> in chat',
910
key: 'underscript.tag.friend',
10-
default: true,
11+
data: { reverse: true },
1112
page: 'Chat',
1213
});
1314

1415
const color = settings.register({
16+
// TODO: Translation
1517
name: 'Friend color',
1618
key: 'underscript.tag.friend.color',
1719
type: 'color',
@@ -21,13 +23,16 @@ const color = settings.register({
2123
reset: true,
2224
});
2325

26+
const friendColor = style.add();
27+
2428
setColor(color.value());
2529

2630
let toast;
2731
function processMessage(message, room) {
2832
if (!tag.value()) return;
2933
if (global('isFriend')(message.user.id)) {
3034
if (!toast) {
35+
// TODO: Translation
3136
toast = infoToast('<span class="friend">Friends</span> are now highlighted in chat.', 'underscript.notice.highlighting', '1');
3237
}
3338
$(`#${room} #message-${message.id} .chat-user`).addClass('friend');
@@ -47,5 +52,5 @@ eventManager.on('Chat:getMessage', function tagFriends(data) {
4752
});
4853

4954
function setColor(newColor) {
50-
style.add(`.friend { color: ${newColor} !important; }`);
55+
friendColor.replace(`.friend { color: ${newColor} !important; }`);
5156
}

src/base/chat/toast.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ const category = Translation.Setting('category.chat.ping');
1313
const setting = settings.register({
1414
name: Translation.Setting('ping.toast'),
1515
key: 'underscript.enable.pingToast',
16-
default: true,
16+
data: { reverse: true },
1717
category,
1818
page: 'Chat',
1919
});
2020

2121
export const globalPing = settings.register({
22-
name: Translation.Setting('ping.toast'),
22+
name: Translation.Setting('ping.global'),
2323
key: 'underscript.enable.ping.global',
2424
category,
2525
page: 'Chat',

src/base/chat/trustedLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const base = {
1313
const setting = settings.register({
1414
...base,
1515
name: Translation.Setting('safelink'),
16-
default: true,
16+
data: { reverse: true },
1717
key: 'underscript.enabled.safelink',
1818
});
1919

src/base/friends/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import style from 'src/utils/style';
1111
const setting = settings.register({
1212
name: Translation.Setting('friend.add'),
1313
key: 'underscript.friend.add',
14-
default: true,
14+
data: { reverse: true },
1515
page: 'Friends',
1616
});
1717

src/base/friends/online.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Translation from 'src/structures/constants/translation';
99
const setting = settings.register({
1010
name: Translation.Setting('friend.online'),
1111
key: 'underscript.enable.onlinefriends',
12-
default: true,
12+
data: { reverse: true },
1313
page: 'Friends',
1414
});
1515
let popper;

src/base/home/newContent.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,36 @@ import onPage from 'src/utils/onPage.js';
55
import cleanData from 'src/utils/cleanData.js';
66
import Translation from 'src/structures/constants/translation';
77

8-
const category = Translation.CATEGORY_HOME;
9-
8+
const base = {
9+
data: { reverse: true },
10+
refresh: () => onPage(''),
11+
category: Translation.CATEGORY_HOME,
12+
};
1013
const bundle = settings.register({
14+
...base,
1115
name: Translation.Setting('toast.bundle'),
1216
key: 'underscript.toast.bundle',
13-
default: true,
14-
refresh: () => onPage(''),
15-
category,
1617
// TODO: Always hide bundles?
1718
});
1819
const skin = settings.register({
20+
...base,
1921
name: Translation.Setting('toast.skins'),
2022
key: 'underscript.toast.skins',
21-
default: true,
22-
refresh: () => onPage(''),
23-
category,
2423
});
2524
const emotes = settings.register({
25+
...base,
2626
name: Translation.Setting('toast.emotes'),
2727
key: 'underscript.toast.emotes',
28-
default: true,
29-
refresh: () => onPage(''),
30-
category,
3128
});
3229
const quest = settings.register({
30+
...base,
3331
name: Translation.Setting('toast.pass'),
3432
key: 'underscript.toast.quests',
35-
default: true,
36-
refresh: () => onPage(''),
37-
category,
3833
});
3934
const card = settings.register({
35+
...base,
4036
name: Translation.Setting('toast.cards'),
4137
key: 'underscript.toast.cards',
42-
default: true,
43-
refresh: () => onPage(''),
44-
category,
4538
});
4639

4740
eventManager.on(':preload:', function toasts() {

src/base/lobby/wasd.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import { global, globalSet } from 'src/utils/global.js';
44
import onPage from 'src/utils/onPage.js';
55
import Translation from 'src/structures/constants/translation';
66

7-
const setting = settings.register({
8-
name: Translation.Setting('minigame.wasd'),
7+
const disable = settings.register({
8+
name: Translation.Setting('minigame.keys'),
99
key: 'underscript.minigames.wasd',
1010
page: 'Lobby',
1111
category: Translation.CATEGORY_MINIGAMES,
1212
});
1313

1414
function onCreate() {
1515
this.super();
16-
if (!setting.value()) return;
16+
if (disable.value()) return;
1717
const game = global('game');
1818
const KeyCode = global('Phaser').KeyCode;
1919
const cursors = game.input.keyboard.addKeys({ up: KeyCode.W, down: KeyCode.S, left: KeyCode.A, right: KeyCode.D });

0 commit comments

Comments
 (0)