Skip to content

Commit d4dbd90

Browse files
Release 1.0.9
1 parent d695b0d commit d4dbd90

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

HDEncode-Search-Plus.user.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name HD-Encode Search+
33
// @namespace https://hdencode.org/
4-
// @version 1.0.8
4+
// @version 1.0.9
55
// @description Filtering, advanced sorting, live custom search, custom pagination, category switching, quick links, NFO panel, settings, presets, bulk copy, and sticky UI for HDEncode.org
66
// @author xXSalamanderXx
77
// @homepage https://github.com/xXSalamanderXx/HDEncode-Search-Plus/
@@ -144,6 +144,12 @@
144144
#${SCRIPT_ID}-bar .fs-search-input { flex: 1 1 340px; min-width: 240px; max-width: 100%; }
145145
#${SCRIPT_ID}-bar .fs-section-line { border-top: 1px solid #21262d; }
146146
147+
/* Remove default spin buttons for a cleaner look on numbers */
148+
#${SCRIPT_ID}-bar input[type=number]::-webkit-inner-spin-button,
149+
#${SCRIPT_ID}-bar input[type=number]::-webkit-outer-spin-button {
150+
opacity: 0.5; /* Keeping them visible but less intrusive */
151+
}
152+
147153
#f-progress-bar { width: 0%; transition: width 0.3s ease-out; }
148154
#f-progress-bar.fs-active {
149155
background: linear-gradient(90deg, rgba(229, 9, 20, 0.08) 0%, rgba(229, 9, 20, 0.24) 18%, rgba(229, 9, 20, 0.55) 36%, #E50914 50%, rgba(229, 9, 20, 0.55) 64%, rgba(229, 9, 20, 0.24) 82%, rgba(229, 9, 20, 0.08) 100%);
@@ -368,14 +374,12 @@
368374
else positiveTokens.push(normalizeSearchText(t));
369375
}
370376

371-
// Must NOT contain negative tokens
372377
for (const neg of negativeTokens) {
373378
if (normalizedText.includes(neg)) return false;
374379
}
375380

376381
if (!positiveTokens.length) return true;
377382

378-
// Must contain positive tokens
379383
const squeezedText = squeezeSearchText(text);
380384
const squeezedQuery = positiveTokens.map(squeezeSearchText).join('');
381385
if (squeezedQuery && squeezedText.includes(squeezedQuery)) return true;
@@ -394,9 +398,9 @@
394398
const h5 = item.querySelector('h5 a');
395399
if (!h5) return '';
396400
let text = h5.textContent || h5.innerText;
397-
text = text.replace(/\[.*?\]/g, ''); // Strip resolutions like [2160p]
398-
text = text.replace(/\(\d{4}\)/g, ''); // Strip (YYYY)
399-
text = text.replace(/[-]\s*[\d.]+\s*(GB|MB).*$/i, ''); // Strip size blocks
401+
text = text.replace(/\[.*?\]/g, '');
402+
text = text.replace(/\(\d{4}\)/g, '');
403+
text = text.replace(/[-]\s*[\d.]+\s*(GB|MB).*$/i, '');
400404
return text.trim();
401405
}
402406

@@ -644,7 +648,6 @@
644648
// Apply Sorting
645649
if (f.sort && f.sort !== 'default') {
646650
const grid = getActiveResultsGrid(container);
647-
// Sort items and append them back (this reorders them in the DOM)
648651
items.sort((a, b) => {
649652
if (f.sort === 'rating-desc') return getRating(b) - getRating(a);
650653
if (f.sort === 'size-desc') return (getSize(b) || 0) - (getSize(a) || 0);
@@ -970,7 +973,7 @@
970973
<div style="display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px;">
971974
<div style="display:flex; align-items:center; gap: 10px;">
972975
<strong class="fs-brand-text">${SCRIPT_NAME}</strong>
973-
<button id="fs-settings-btn" title="Filter Settings" style="background:transparent; border:none; color:#8b949e; cursor:pointer; font-size:16px; padding:0; transition:color 0.2s;">⚙️</button>
976+
<button id="fs-settings-btn" title="Persistence Settings" style="background:transparent; border:none; color:#8b949e; cursor:pointer; font-size:16px; padding:0; transition:color 0.2s;">⚙️</button>
974977
<button id="fs-save-preset-btn" title="Save current filters as Preset" style="background:transparent; border:1px solid #30363d; border-radius: 6px; color:#8b949e; cursor:pointer; font-size:12px; padding:4px 8px; transition:all 0.2s;">💾 Save Preset</button>
975978
</div>
976979
<div style="display:flex; gap: 8px;">
@@ -988,7 +991,7 @@
988991
</div>
989992
990993
<div id="fs-settings-panel" style="display:none; margin-bottom: 12px; padding: 12px; border-radius: 8px; background: #161b22; border: 1px solid #30363d; font-size: 12px; color: #8b949e;">
991-
<div style="font-weight: 600; margin-bottom: 10px; color: #e6edf3;">Save Filters Between Visits:</div>
994+
<div style="font-weight: 600; margin-bottom: 10px; color: #e6edf3;">💾 Persistence Settings: Choose which filters should be remembered next time you visit the site:</div>
992995
<div style="display: flex; flex-wrap: wrap; gap: 14px;">
993996
<label style="cursor:pointer;"><input type="checkbox" data-setting="f-dv"> Dolby Vision</label>
994997
<label style="cursor:pointer;"><input type="checkbox" data-setting="f-hdr"> HDR</label>
@@ -1020,9 +1023,9 @@
10201023
<option value="720p">720p</option>
10211024
</select>
10221025
1023-
<input type="number" id="f-rating" placeholder="Min Rating" step="0.1" min="0" max="10" style="${INPUT_STYLE} width:95px;">
1024-
<input type="number" id="f-minsize" placeholder="Min GB" min="0" style="${INPUT_STYLE} width:75px;">
1025-
<input type="number" id="f-maxsize" placeholder="Max GB" min="0" style="${INPUT_STYLE} width:75px;">
1026+
<input type="number" id="f-rating" placeholder="Min Rating" step="0.1" min="0" max="10" style="${INPUT_STYLE} width:100px; padding-right: 4px;">
1027+
<input type="number" id="f-minsize" placeholder="Min GB" min="0" style="${INPUT_STYLE} width:85px; padding-right: 4px;">
1028+
<input type="number" id="f-maxsize" placeholder="Max GB" min="0" style="${INPUT_STYLE} width:85px; padding-right: 4px;">
10261029
10271030
<select id="f-group" class="fs-search-select" style="${INPUT_STYLE} width:165px;">
10281031
<option value="">All Release Groups</option>

0 commit comments

Comments
 (0)