Skip to content

Commit 24b22bb

Browse files
committed
V1.12.2
1 parent bbe01ac commit 24b22bb

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

Steam Web Integration.user.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// @run-at document-start
3232
// @supportURL https://github.com/Revadike/SteamWebIntegration/issues/
3333
// @updateURL https://github.com/Revadike/SteamWebIntegration/raw/master/Steam%20Web%20Integration.user.js
34-
// @version 1.12.1
34+
// @version 1.12.2
3535
// ==/UserScript==
3636

3737
// ==Code==
@@ -459,7 +459,7 @@ function doApp(elem, wishlist, ownedApps, ignoredApps, followedApps, decommissio
459459
}, 0);
460460
}
461461

462-
function doSub(elem, ownedPackages, lcs) {
462+
function doSub(elem, ownedPackages, bundles, lcs, blcs) {
463463
$(elem).addClass("swi");
464464

465465
/* Example detectable links:
@@ -491,6 +491,11 @@ function doSub(elem, ownedPackages, lcs) {
491491
iconsEncoding += 2;
492492
}
493493

494+
if (settings.wantBundles && bundles && bundles[subID] && bundles[subID].bundles && bundles[subID].bundles > 0) { // if bundled and enabled
495+
html += getIconHTML(settings.bundleColor, `Package (${subID}) has been in ${bundles[subID].bundles} bundle${bundles[subID].bundles === 1 ? "" : "s"}`, blcs, settings.bundleIcon, `https://barter.vg/steam/sub/${subID}/#bundles`); // 🎁︎
496+
iconsEncoding += 10;
497+
}
498+
494499
if (settings.prefix) {
495500
$(elem).before(getBoxNode(html, iconsEncoding, undefined, subID));
496501
} else {
@@ -558,7 +563,7 @@ function integrate(userdata, decommissioned, cards, bundles, limited, dlc, lastC
558563
$(appSelector, document.body).get()
559564
.forEach((elem) => doApp(elem, wishlist, ownedApps, ignoredApps, followedApps, decommissioned, limited, cards, bundles, dlc, lcs, dlcs, dlclcs, llcs, clcs, blcs));
560565
$(subSelector, document.body).get()
561-
.forEach((elem) => doSub(elem, ownedPackages, lcs), 0);
566+
.forEach((elem) => doSub(elem, ownedPackages, bundles, lcs, blcs), 0);
562567
}, delay);
563568
};
564569

settings/index.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,16 @@ <h1 id="title"></h1>
201201
<tbody>
202202
<tr id="blackListRow">
203203
<td><b>blackList</b></td>
204-
<td>Enter a list of domains (or partial URLs!) you don't want this script to run on – separated by line breaks (enter/return).</td>
204+
<td>Enter a list of domains or (partial) URLs you don't want SWI to run on – separated by line
205+
breaks (enter/return).</td>
205206
<td><textarea id="blackList" name="blackList" onchange="onChange(this)" cols="30" rows="5"></textarea>
206207
</td>
207208
</tr>
208209
<tr id="whiteListModeRow">
209210
<td><b>whiteListMode</b></td>
210-
<td>Invert the <a href="#blackListRow">blackList</a>, so that this script will only run on matching domains (or partial URLs).</td>
211+
<td>Convert the <a href="#blackListRow">blackList</a> to a whitelist, such that SWI will only run on
212+
matching
213+
domains (or partial URLs).</td>
211214
<td><input id="whiteListMode" name="whiteListMode" type="checkbox" onclick="onChange(this)"></td>
212215
</tr>
213216
<tr id="dynamicContentRow">
@@ -221,14 +224,15 @@ <h1 id="title"></h1>
221224
</tr>
222225
<tr id="pingIntervalRow">
223226
<td><b>pingInterval</b></td>
224-
<td>The number of ms in between page checks (only when <a href="#dynamicContentRow">dynamicContent</a> is set
227+
<td>The number of ms in between page checks (only when <a href="#dynamicContentRow">dynamicContent</a> is
228+
set
225229
to "Periodically check web page").</td>
226230
<td><input id="pingInterval" name="pingInterval" value="1500" min="1000" step="100" type="number"
227231
oninput="onChange(this)"></td>
228232
</tr>
229233
<tr id="prefixRow">
230234
<td><b>prefix</b></td>
231-
<td>Prefix (checked) instead of suffix (unchecked) position icon.</td>
235+
<td>Prefix (checked) instead of suffix (unchecked) position for the icons placement.</td>
232236
<td><input id="prefix" name="prefix" type="checkbox" onclick="onChange(this)"></td>
233237
</tr>
234238
<tr id="boxedRow">
@@ -280,44 +284,44 @@ <h1 id="title"></h1>
280284
</tr>
281285
<tr id="wantIgnoresRow">
282286
<td><b>wantIgnores</b></td>
283-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for ignored (not interested)
287+
<td>Whether (checked) or not (unchecked) you want to display an icon for ignored (not interested)
284288
apps.</td>
285289
<td><input id="wantIgnores" name="wantIgnores" checked="" type="checkbox" onclick="onChange(this)"></td>
286290
</tr>
287291
<tr id="wantFollowedRow">
288292
<td><b>wantFollowed</b></td>
289-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for followed (not interested)
293+
<td>Whether (checked) or not (unchecked) you want to display an icon for followed (not interested)
290294
apps.</td>
291295
<td><input id="wantFollowed" name="wantFollowed" checked="" type="checkbox" onclick="onChange(this)"></td>
292296
</tr>
293297
<tr id="wantDLCRow">
294298
<td><b>wantDLC</b></td>
295-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for downloadable content (DLC).
299+
<td>Whether (checked) or not (unchecked) you want to display an icon for downloadable content (DLC).
296300
</td>
297301
<td><input id="wantDLC" name="wantDLC" checked="" type="checkbox" onclick="onChange(this)"></td>
298302
</tr>
299303
<tr id="wantDecommissionedRow">
300304
<td><b>wantDecommissioned</b></td>
301-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for removed or delisted
305+
<td>Whether (checked) or not (unchecked) you want to display an icon for removed or delisted
302306
(decommissioned) apps.</td>
303307
<td><input id="wantDecommissioned" name="wantDecommissioned" checked="" type="checkbox"
304308
onclick="onChange(this)"></td>
305309
</tr>
306310
<tr id="wantLimitedRow">
307311
<td><b>wantLimited</b></td>
308-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for low confidence metric apps.
312+
<td>Whether (checked) or not (unchecked) you want to display an icon for low confidence metric apps.
309313
</td>
310314
<td><input id="wantLimited" name="wantLimited" checked="" type="checkbox" onclick="onChange(this)"></td>
311315
</tr>
312316
<tr id="wantCardsRow">
313317
<td><b>wantCards</b></td>
314-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for apps with cards.</td>
318+
<td>Whether (checked) or not (unchecked) you want to display an icon for apps with cards.</td>
315319
<td><input id="wantCards" name="wantCards" checked="" type="checkbox" onclick="onChange(this)">
316320
</td>
317321
</tr>
318322
<tr id="wantBundlesRow">
319323
<td><b>wantBundles</b></td>
320-
<td>Whether (checked) or not (unchecked) you want to display an extra icon for previously bundled apps.
324+
<td>Whether (checked) or not (unchecked) you want to display an icon for previously bundled apps.
321325
</td>
322326
<td><input id="wantBundles" name="wantBundles" checked="" type="checkbox" onclick="onChange(this)"></td>
323327
</tr>

0 commit comments

Comments
 (0)