-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
212 lines (184 loc) · 4.61 KB
/
index.html
File metadata and controls
212 lines (184 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>NFSU2 Save Editor (Offline)</title>
<style>
:root {
--bg: #0f1220;
--panel: #171a2b;
--muted: #98a2b3;
--text: #e5e7eb;
--accent: #60a5fa;
}
html,
body {
height: 100%
}
body {
margin: 0;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
background: var(--bg);
color: var(--text);
}
.wrap {
max-width: 900px;
margin: 0 auto;
padding: 24px;
}
h1 {
font-size: clamp(20px, 3vw, 28px);
margin: 0 0 8px
}
.sub {
color: var(--muted);
margin-bottom: 16px
}
.card {
background: var(--panel);
border: 1px solid #22263e;
border-radius: 16px;
padding: 16px;
margin: 12px 0;
box-shadow: 0 4px 24px rgba(0, 0, 0, .25)
}
.row {
display: flex;
gap: 12px;
flex-wrap: wrap
}
label {
display: block;
font-weight: 600;
margin-bottom: 6px
}
input[type="file"],
input[type="number"],
input[type="text"],
select,
button {
background: #0e1224;
border: 1px solid #252b45;
color: var(--text);
border-radius: 10px;
padding: 10px 12px
}
input[type="number"],
input[type="text"],
select {
width: 100%
}
button {
cursor: pointer
}
button.primary {
background: linear-gradient(180deg, #2563eb, #1d4ed8);
border: 0
}
button:disabled {
opacity: .5;
cursor: not-allowed
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 14px
}
.muted {
color: var(--muted)
}
.pill {
display: inline-block;
padding: 4px 8px;
border-radius: 999px;
background: #0b1022;
border: 1px solid #2a3053;
font-size: 12px
}
.warn {
color: #fbbf24
}
.ok {
color: #34d399
}
details {
border: 1px dashed #2a3053;
border-radius: 12px;
padding: 10px
}
code {
background: #0b1022;
border: 1px solid #2a3053;
padding: 2px 6px;
border-radius: 6px
}
.footer {
margin-top: 18px;
font-size: 12px;
color: var(--muted)
}
</style>
</head>
<body>
<div class="wrap">
<h1>NFS Underground 2 – Save Editor (100% client‑side)</h1>
<div class="sub">Open a save file, tweak name, money and car performance, then download the modified file. No
uploads; everything stays in your browser.</div>
<div class="card">
<div class="grid">
<div>
<label for="file">Save file</label>
<input id="file" type="file" accept="*/*" />
<div class="muted" id="fileInfo">No file selected.</div>
</div>
<div>
<label> </label>
<label class="muted"><input id="backupToggle" type="checkbox" checked /> Create .bak backup on load</label>
</div>
</div>
</div>
<div class="card" id="summary" hidden>
<div class="grid">
<div>
<div class="muted">Profile Name</div>
<div id="profile" class="pill">—</div>
</div>
<div>
<div class="muted">Money</div>
<div id="moneyDisplay" class="pill">—</div>
</div>
<div>
<div class="muted">Car Slots Used</div>
<div id="slots" class="pill">—</div>
</div>
<div>
<div class="muted">Header Check</div>
<div id="headerStatus" class="pill">—</div>
</div>
</div>
</div>
<div class="card" id="editor" hidden>
<div class="grid">
<div>
<label for="name">New Profile Name (leave empty = no change)</label>
<input id="name" type="text" maxlength="32" />
</div>
<div>
<label for="money">New Money (‑1 = no change)</label>
<input id="money" type="number" step="1" />
</div>
</div>
<div style="height:12px"></div>
<div class="grid" id="cars"></div>
<div style="height:12px"></div>
<div class="row">
<button id="apply" class="primary" disabled>Apply Changes</button>
<button id="download" disabled>Download Modified Save</button>
<button id="downloadBak" disabled>Download Backup (.bak)</button>
<button id="reload">Reset (re‑read file)</button>
</div>
</div>
<script src="src/nfsu2saveeditor.js"></script>
</body>
</html>