Skip to content

Commit e3b88dd

Browse files
committed
push 4.1.0
1 parent 3a16417 commit e3b88dd

7 files changed

Lines changed: 201 additions & 31 deletions

File tree

display/driverLoader.js

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
function loadDrivers(jsonUrl, containerId) {
66
console.log(`Loading drivers from: ${jsonUrl} into #${containerId}`);
77

8-
//region preference
98
const userRegion = localStorage.getItem("userRegion") || "USA";
109

1110
fetch(jsonUrl)
@@ -23,7 +22,6 @@ function loadDrivers(jsonUrl, containerId) {
2322
return;
2423
}
2524

26-
//Clear existing
2725
container.innerHTML = '';
2826

2927
if (data.warningMessage) {
@@ -33,23 +31,21 @@ function loadDrivers(jsonUrl, containerId) {
3331
container.appendChild(warningDiv);
3432
}
3533

36-
//driver list container
3734
const driverList = document.createElement('div');
3835
driverList.className = 'driver-list';
39-
40-
//Add driver
36+
4137
data.drivers.forEach(driver => {
4238
const driverItem = document.createElement('div');
4339
driverItem.className = driver.hasWarning ? 'driver-item warning' : 'driver-item';
4440

45-
//driver link/warning link
41+
4642
const driverLink = document.createElement('a');
4743
if (driver.hasWarning && driver.warningUrl) {
4844
driverLink.href = driver.warningUrl;
4945
driverLink.className = 'amd-button';
5046
driverLink.innerHTML = `⚠️ ${driver.version} - ${driver.type}`;
5147
} else if (driver.downloadUrl) {
52-
//Apply region NVIDIA URLs
48+
5349
let downloadUrl = driver.downloadUrl;
5450
if (containerId.includes('nvidia') && userRegion === "EU") {
5551
downloadUrl = downloadUrl.replace("us.download.nvidia.com", "uk.download.nvidia.com");
@@ -60,7 +56,6 @@ function loadDrivers(jsonUrl, containerId) {
6056
driverLink.className = containerId.includes('nvidia') ? 'nvidia-button' : 'intel-button';
6157
driverLink.textContent = `${driver.version} ${driver.type ? '- ' + driver.type : ''}`;
6258

63-
6459
driverLink.dataset.originalUrl = driver.downloadUrl;
6560
} else {
6661
//Fallback
@@ -75,11 +70,37 @@ function loadDrivers(jsonUrl, containerId) {
7570
dateSpan.textContent = `Released ${driver.releaseDate}`;
7671
driverItem.appendChild(dateSpan);
7772

78-
//containers
73+
if (driver.sha256sum) {
74+
const hashContainer = document.createElement('div');
75+
hashContainer.className = 'hash-container';
76+
hashContainer.style.display = 'none';
77+
hashContainer.innerHTML = `<span class="hash-label">SHA256:</span> <span class="hash-value">${driver.sha256sum}</span>`;
78+
79+
const hashButton = document.createElement('button');
80+
hashButton.className = 'hash-button';
81+
hashButton.innerHTML = '<span class="material-icons">fingerprint</span>';
82+
hashButton.title = 'Show SHA256 hash';
83+
hashButton.onclick = function(e) {
84+
e.preventDefault();
85+
e.stopPropagation();
86+
if (hashContainer.style.display === 'none') {
87+
hashContainer.style.display = 'block';
88+
hashButton.title = 'Hide SHA256 hash';
89+
hashButton.classList.add('active');
90+
} else {
91+
hashContainer.style.display = 'none';
92+
hashButton.title = 'Show SHA256 hash';
93+
hashButton.classList.remove('active');
94+
}
95+
};
96+
97+
driverItem.appendChild(hashButton);
98+
driverItem.appendChild(hashContainer);
99+
}
100+
79101
const iconsContainer = document.createElement('div');
80102
iconsContainer.className = 'driver-icons-container';
81103

82-
//Reddit link
83104
if (driver.redditUrl) {
84105
const communityLink = document.createElement('a');
85106
communityLink.href = driver.redditUrl;
@@ -95,7 +116,6 @@ function loadDrivers(jsonUrl, containerId) {
95116
iconsContainer.appendChild(communityLink);
96117
}
97118

98-
//stability grade
99119
if (driver.isStable && driver.stabilityGrade) {
100120
const gradeSpan = document.createElement('span');
101121
gradeSpan.className = 'stability-grade';
@@ -110,7 +130,6 @@ function loadDrivers(jsonUrl, containerId) {
110130

111131
container.appendChild(driverList);
112132

113-
//last updated note
114133
const updateNote = document.createElement('div');
115134
updateNote.className = 'update-note';
116135
updateNote.textContent = `Drivers list updated: ${data.lastUpdated}`;

display/v4.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,4 +939,48 @@ footer img:hover {
939939
.iframe-container iframe {
940940
height: 550px;
941941
}
942+
}
943+
944+
.hash-button {
945+
display: inline-flex;
946+
align-items: center;
947+
justify-content: center;
948+
background-color: var(--secondary-color);
949+
color: white;
950+
border: none;
951+
border-radius: 4px;
952+
padding: 4px 8px;
953+
margin-left: 8px;
954+
cursor: pointer;
955+
transition: background-color 0.2s;
956+
}
957+
958+
.hash-button:hover {
959+
background-color: var(--secondary-color-hover);
960+
}
961+
962+
.hash-button.active {
963+
background-color: var(--primary-color);
964+
}
965+
966+
.hash-container {
967+
margin-top: 6px;
968+
margin-bottom: 6px;
969+
padding: 8px 12px;
970+
background-color: rgba(0, 0, 0, 0.05);
971+
border-left: 3px solid var(--primary-color);
972+
border-radius: 2px;
973+
font-family: monospace;
974+
font-size: 0.9em;
975+
word-break: break-all;
976+
color: var(--text-color);
977+
}
978+
979+
.hash-label {
980+
font-weight: bold;
981+
margin-right: 8px;
982+
}
983+
984+
.hash-value {
985+
font-family: 'Courier New', Courier, monospace;
942986
}

driverLoader.js

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
function loadDrivers(jsonUrl, containerId) {
66
console.log(`Loading drivers from: ${jsonUrl} into #${containerId}`);
77

8-
//region preference
98
const userRegion = localStorage.getItem("userRegion") || "USA";
109

1110
fetch(jsonUrl)
@@ -23,7 +22,6 @@ function loadDrivers(jsonUrl, containerId) {
2322
return;
2423
}
2524

26-
//Clear existing
2725
container.innerHTML = '';
2826

2927
if (data.warningMessage) {
@@ -33,23 +31,21 @@ function loadDrivers(jsonUrl, containerId) {
3331
container.appendChild(warningDiv);
3432
}
3533

36-
//driver list container
3734
const driverList = document.createElement('div');
3835
driverList.className = 'driver-list';
39-
40-
//Add driver
36+
4137
data.drivers.forEach(driver => {
4238
const driverItem = document.createElement('div');
4339
driverItem.className = driver.hasWarning ? 'driver-item warning' : 'driver-item';
4440

45-
//driver link/warning link
41+
4642
const driverLink = document.createElement('a');
4743
if (driver.hasWarning && driver.warningUrl) {
4844
driverLink.href = driver.warningUrl;
4945
driverLink.className = 'amd-button';
5046
driverLink.innerHTML = `⚠️ ${driver.version} - ${driver.type}`;
5147
} else if (driver.downloadUrl) {
52-
//Apply region NVIDIA URLs
48+
5349
let downloadUrl = driver.downloadUrl;
5450
if (containerId.includes('nvidia') && userRegion === "EU") {
5551
downloadUrl = downloadUrl.replace("us.download.nvidia.com", "uk.download.nvidia.com");
@@ -60,7 +56,6 @@ function loadDrivers(jsonUrl, containerId) {
6056
driverLink.className = containerId.includes('nvidia') ? 'nvidia-button' : 'intel-button';
6157
driverLink.textContent = `${driver.version} ${driver.type ? '- ' + driver.type : ''}`;
6258

63-
6459
driverLink.dataset.originalUrl = driver.downloadUrl;
6560
} else {
6661
//Fallback
@@ -75,11 +70,37 @@ function loadDrivers(jsonUrl, containerId) {
7570
dateSpan.textContent = `Released ${driver.releaseDate}`;
7671
driverItem.appendChild(dateSpan);
7772

78-
//containers
73+
if (driver.sha256sum) {
74+
const hashContainer = document.createElement('div');
75+
hashContainer.className = 'hash-container';
76+
hashContainer.style.display = 'none';
77+
hashContainer.innerHTML = `<span class="hash-label">SHA256:</span> <span class="hash-value">${driver.sha256sum}</span>`;
78+
79+
const hashButton = document.createElement('button');
80+
hashButton.className = 'hash-button';
81+
hashButton.innerHTML = '<span class="material-icons">fingerprint</span>';
82+
hashButton.title = 'Show SHA256 hash';
83+
hashButton.onclick = function(e) {
84+
e.preventDefault();
85+
e.stopPropagation();
86+
if (hashContainer.style.display === 'none') {
87+
hashContainer.style.display = 'block';
88+
hashButton.title = 'Hide SHA256 hash';
89+
hashButton.classList.add('active');
90+
} else {
91+
hashContainer.style.display = 'none';
92+
hashButton.title = 'Show SHA256 hash';
93+
hashButton.classList.remove('active');
94+
}
95+
};
96+
97+
driverItem.appendChild(hashButton);
98+
driverItem.appendChild(hashContainer);
99+
}
100+
79101
const iconsContainer = document.createElement('div');
80102
iconsContainer.className = 'driver-icons-container';
81103

82-
//Reddit link
83104
if (driver.redditUrl) {
84105
const communityLink = document.createElement('a');
85106
communityLink.href = driver.redditUrl;
@@ -95,7 +116,6 @@ function loadDrivers(jsonUrl, containerId) {
95116
iconsContainer.appendChild(communityLink);
96117
}
97118

98-
//stability grade
99119
if (driver.isStable && driver.stabilityGrade) {
100120
const gradeSpan = document.createElement('span');
101121
gradeSpan.className = 'stability-grade';
@@ -110,7 +130,6 @@ function loadDrivers(jsonUrl, containerId) {
110130

111131
container.appendChild(driverList);
112132

113-
//last updated note
114133
const updateNote = document.createElement('div');
115134
updateNote.className = 'update-note';
116135
updateNote.textContent = `Drivers list updated: ${data.lastUpdated}`;

info/v4.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,4 +939,48 @@ footer img:hover {
939939
.iframe-container iframe {
940940
height: 550px;
941941
}
942+
}
943+
944+
.hash-button {
945+
display: inline-flex;
946+
align-items: center;
947+
justify-content: center;
948+
background-color: var(--secondary-color);
949+
color: white;
950+
border: none;
951+
border-radius: 4px;
952+
padding: 4px 8px;
953+
margin-left: 8px;
954+
cursor: pointer;
955+
transition: background-color 0.2s;
956+
}
957+
958+
.hash-button:hover {
959+
background-color: var(--secondary-color-hover);
960+
}
961+
962+
.hash-button.active {
963+
background-color: var(--primary-color);
964+
}
965+
966+
.hash-container {
967+
margin-top: 6px;
968+
margin-bottom: 6px;
969+
padding: 8px 12px;
970+
background-color: rgba(0, 0, 0, 0.05);
971+
border-left: 3px solid var(--primary-color);
972+
border-radius: 2px;
973+
font-family: monospace;
974+
font-size: 0.9em;
975+
word-break: break-all;
976+
color: var(--text-color);
977+
}
978+
979+
.hash-label {
980+
font-weight: bold;
981+
margin-right: 8px;
982+
}
983+
984+
.hash-value {
985+
font-family: 'Courier New', Courier, monospace;
942986
}

sitemap.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://driverhub.win</loc>
5-
<lastmod>2025-07-20</lastmod>
5+
<lastmod>2025-07-24</lastmod>
66
<changefreq>weekly</changefreq>
77
<priority>1.0</priority>
88
</url>
99
<url>
1010
<loc>https://driverhub.win/display</loc>
11-
<lastmod>2025-07-20</lastmod>
11+
<lastmod>2025-07-24</lastmod>
1212
<changefreq>monthly</changefreq>
1313
<priority>1.0</priority>
1414
</url>
1515
<url>
1616
<loc>https://driverhub.win/chipset</loc>
17-
<lastmod>2025-07-20</lastmod>
17+
<lastmod>2025-07-24</lastmod>
1818
<changefreq>monthly</changefreq>
1919
<priority>0.5</priority>
2020
</url>
2121
<url>
2222
<loc>https://driverhub.win/display/laptop</loc>
23-
<lastmod>2025-07-20</lastmod>
23+
<lastmod>2025-07-24</lastmod>
2424
<changefreq>monthly</changefreq>
2525
<priority>1.0</priority>
2626
</url>
2727
<url>
2828
<loc>https://driverhub.win/contact</loc>
29-
<lastmod>2025-07-20</lastmod>
29+
<lastmod>2025-07-24</lastmod>
3030
<changefreq>monthly</changefreq>
3131
<priority>0.5</priority>
3232
</url>

0 commit comments

Comments
 (0)