Skip to content

Commit

Permalink
Merge pull request #268 from salcido/release-scanner-fix
Browse files Browse the repository at this point in the history
Release Scanner Fixes
  • Loading branch information
salcido authored Feb 1, 2024
2 parents 2939abf + 93621b8 commit cd84311
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 54 deletions.
3 changes: 2 additions & 1 deletion css/compact-artist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ table[class*="releases_"] {
}
}

table[class*="releases_"],
table[class*="labelReleasesTable_"] {
tr[class*="textWithCoversRow_"] {
grid-template-columns: 72px 2fr 1fr 1fr .7fr .3fr .5fr .5fr;
Expand All @@ -90,7 +91,7 @@ table[class*="labelReleasesTable_"] {
}
}


table[class*="releases_"],
div[class*="releasesGrid_"] {
tr[class*="textWithCoversRow_"] {
grid-template-columns: 70px 2fr 1fr 1fr .7fr .3fr .5fr .5fr !important;
Expand Down
10 changes: 9 additions & 1 deletion css/dark-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5136,7 +5136,7 @@
}

// for sale count
span[class*="forsale_"] span[class*="price_"] {
span[class*="forSale_"] span[class*="price_"] {
color: var(--price) !important;
}

Expand Down Expand Up @@ -5669,7 +5669,14 @@

div[class*="filterBarContainerDesktop_"] {

// Filters hidden
div[class*="filterButtonContainerWhite_"] {
button {
border: 1px solid var(--headers) !important;
}
}
// Filters visible
div[class*="filterButtonContainer_"] {
button {
background: var(--headers) !important;
}
Expand Down Expand Up @@ -5910,6 +5917,7 @@

div.rnf-unseen-badge {
background: var(--skittle-wantlist) !important;
outline: 2px solid var(--site-header-bg) !important;

span.rnf-unseen-badge__count {
color: var(--white) !important;
Expand Down
2 changes: 1 addition & 1 deletion css/new-release-page-fixes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// reduce large padding on Release Header table
#page div[class*="info_"] table[class*="table_"] tr th,
#page div[class*="info_"] table[class*="table_"] tr td {
padding-bottom: 3px !important;
padding-bottom: 0px !important;
}

// decrease the height of the add to collection / wantlist buttons
Expand Down
16 changes: 8 additions & 8 deletions html/learn.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ <h2 id="collectionBoxFix">Collection Box Fix</h2>

<!-- Compact Artist Page -->
<div class="feature-block">
<h2 id="compactArtist">Compact Artist Pages</h2>
<p>Reduces the overall white space around the release images and the filter side bar on Artist pages. You can toggle this feature on/off and see the effects without having to refresh the page.</p>
<h2 id="compactArtist">Compact Artist & Label Pages</h2>
<p>Reduces the overall white space around the release images and the filter side bar on Artist and Label pages. You can toggle this feature on/off and see the effects without having to refresh the page.</p>

<img src="../img/learn/compact-before.png" class="max-width" />
<figcaption>Default Layout</figcaption>
Expand Down Expand Up @@ -450,12 +450,6 @@ <h2 id="filter-unavailable">Filter Unavailable Items</h2>
<!-- <img src="../img/learn/feature-image.png" class="max-width" /> -->
</div>

<!-- Force Dashboard Link -->
<div class="feature-block">
<h2 id="force-dashboard">Dashboard Link</h2>
<p>Clicking the Discogs logo in the header will take you to your Dashboard when this is enabled. When this feature is enabled the Dashboard icon in the nav will be hidden.</p>
</div>

<!-- Full Width Pages -->
<div class="feature-block">
<h2 id="fullWidthPages">Full Width Pages</h2>
Expand Down Expand Up @@ -596,6 +590,12 @@ <h3>Wantlist</h3>
<p>An item link or thumbnail.</p>
</div>

<!-- Force Dashboard Link -->
<div class="feature-block">
<h2 id="force-dashboard">Original Dashboard Link</h2>
<p>Clicking the Discogs logo in the header will take you to your Dashboard when this is enabled. When this feature is enabled the Dashboard icon in the nav will be hidden.</p>
</div>

<!-- quick search -->
<div class="feature-block">

Expand Down
48 changes: 24 additions & 24 deletions html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,30 +256,6 @@ <h2>&#x1F44B; Heads up!</h2>
</div> <!-- /.help -->
</div>

<!-- Force Dashboard Link -->
<div class="toggle-group">
<p class="label">Dashboard Link</p>
<div class="meta hide">Old Dashboard Link header logo homepage</div>

<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="toggleForceDashboard" checked>
<label class="onoffswitch-label" for="toggleForceDashboard">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>

<div class="help force-dashboard">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle" color="#384047"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12" y2="17"></line></svg>
<div class="help-bubble">
<div class="help-text">
Clicking the Discogs logo in the header will take you to your Dashboard when this is enabled. <span>Note this will hide the Dashboard icon in the nav bar.</span>
</div>
<div class="arrow-right stroke"></div><div class="arrow-right"></div>
</div>
</div> <!-- /.help -->
</div>

<!-- Demand Index -->
<div class="toggle-group">
<p class="label">Demand Index</p>
Expand Down Expand Up @@ -940,6 +916,30 @@ <h2>&#x1F44B; Heads up!</h2>
</div>
</div>

<!-- Force Dashboard Link -->
<div class="toggle-group">
<p class="label">Original Dashboard Link</p>
<div class="meta hide">Old Dashboard Link header logo homepage</div>

<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="toggleForceDashboard" checked>
<label class="onoffswitch-label" for="toggleForceDashboard">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>

<div class="help force-dashboard">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle" color="#384047"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12" y2="17"></line></svg>
<div class="help-bubble">
<div class="help-text">
Clicking the Discogs logo in the header will take you to your Dashboard when this is enabled. <span>Note this will hide the Dashboard icon in the nav bar.</span>
</div>
<div class="arrow-right stroke"></div><div class="arrow-right"></div>
</div>
</div> <!-- /.help -->
</div>

<!-- Quick Search -->
<div class="toggle-group">
<p class="label">Quick Search</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
*/
function openInNewTabs() {

let anchors = document.querySelectorAll('table[class*="releases_"] tr a');
let anchors = document.querySelectorAll('table[class*="labelReleasesTable_"] tr a');

anchors.forEach(a => {
a.setAttribute('target', '_blank');
Expand Down Expand Up @@ -253,7 +253,7 @@
document.querySelector('.reset-scanner-wrap').classList.add('hide');
document.querySelectorAll('.de-scan-badge-wrap').forEach(badge => badge.remove());

skittles = document.querySelectorAll('td[class*="skittles_"]');
skittles = document.querySelectorAll('tr[class*="text"] td[class*="skittles_"]');
}

// ========================================================
Expand Down Expand Up @@ -401,14 +401,14 @@
// ========================================================
if ( rl.pageIs('history') ) return;

if ( rl.pageIs('artist') ) {
if ( rl.pageIs('artist') || rl.pageIs('label') ) {

let artistButtonsDiv = 'div[class*="artistButtons_"]';
let buttonDiv = 'div[class*="buttons_"]';

if ( document.querySelector(artistButtonsDiv) ) {
if ( document.querySelector(buttonDiv) ) {

// 'td[class*="skittles_"]' needs to exist before the skittles var can have a value
rl.waitForElement('td[class*="skittles_"]').then(() => {
rl.waitForElement('tr[class*="text"] td[class*="skittles_"]').then(() => {

let scanText = 'Scan Releases',
resetText = 'Reset Scanner',
Expand All @@ -417,11 +417,11 @@
<button class="reset-scanner">${resetText}</button>
</div>`;

skittles = document.querySelectorAll('td[class*="skittles_"]');
skittles = document.querySelectorAll('tr[class*="text"] td[class*="skittles_"]');

rl.attachCss('scan-badges', rules);

document.querySelector(artistButtonsDiv).insertAdjacentHTML('beforeend', buttonMarkup);
document.querySelector(buttonDiv).insertAdjacentHTML('afterend', buttonMarkup);

// Event Listeners
// ------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions js/extension/user-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,13 +1044,13 @@ appendFragment([resourceLibrary])

elems.push(releaseScanner);

let releaseScannerArtist = document.createElement('script');
let releaseScannerArtistLabel = document.createElement('script');

releaseScannerArtist.type = 'text/javascript';
releaseScannerArtist.src = chrome.runtime.getURL('js/extension/features/release-scanner-artist.js');
releaseScannerArtist.className = 'de-init';
releaseScannerArtistLabel.type = 'text/javascript';
releaseScannerArtistLabel.src = chrome.runtime.getURL('js/extension/features/release-scanner-artist-label.js');
releaseScannerArtistLabel.className = 'de-init';

elems.push(releaseScannerArtist);
elems.push(releaseScannerArtistLabel);
}

if (prefs.removeFromWantlist) {
Expand Down
10 changes: 7 additions & 3 deletions js/popup/change-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ module.exports = {
{
features: [{
name: 'Collection Box Fix',
description: 'Threw together a quick feature that moves the "In Collection" box back to it\'s original location on the Release Page.',
description: 'Threw together a quick feature that moves the "In Collection" and "In Wantlist" boxes back to their original locations on the Release Page.',
link: '#collectionBoxFix',
}],
removedFeatures: [],
updates: [
{
name: 'Enhancement',
description: 'Release Scanner has been updated to work with the new Artist Page. Let me know if you find any issues with it.'
name: 'Update',
description: 'Dashboard Link has been renamed to Original Dashboard Link'
},
{
name: 'Update',
description: 'Release Scanner has been updated to work with the new Artist and Label Pages. Let me know if you find any issues with it.'
},
],
thanks: ['Massive thank you to Thomas L. and Noah S. for the kind donations!'],
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Discogs Enhancer",
"short_name": "Discogs Enhancer",
"description": "Adds a dark theme, block sellers, price comparisons, currency converter, configurable quick search, & more to Discogs!",
"version": "3.6.7",
"version": "3.6.8",
"author": "Matthew Salcido",
"homepage_url": "https://www.discogs-enhancer.com",
"action": {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discogs-enhancer",
"version": "3.6.7",
"version": "3.6.8",
"description": "A Chrome extension that adds useful functionality to Discogs.com! https://www.discogs-enhancer.com",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit cd84311

Please sign in to comment.