Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Feature - Collection Box Location #272

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions html/learn.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ <h2 id="blockSellers">Block Sellers</h2>
<p><em>Note:</em> This feature will not track seller username changes so if a seller changes their username, you will have to add the new username to the blocklist.</p>
</div>

<!-- Collection Box Fix -->
<!-- Collection Box Location -->
<div class="feature-block">
<h2 id="collectionBoxFix">Collection Box Fix</h2>
<h2 id="collectionBoxFix">Collection Box Location</h2>
<p>Moves the In Collection / In Wantlist boxes back to their original locations on the Release Page.</p>
<img src="../img/learn/collection-box-after.png" class="max-width mt-3" />
<figcaption>Feature enabled</figcaption>
Expand Down Expand Up @@ -958,6 +958,7 @@ <h2 id="thanks">Thank You</h2>
<li class="donor">Ian</li>
<li>Jacob V.</li>
<li class="donor">James G.</li>
<li class="donor">Jarrett</li>
<li class="donor">Jason B. <span style="color: #fff;">&#9733;</span></li>
<li class="donor">Jason F.</li>
<li class="donor">Jeffrey T.</li>
Expand Down Expand Up @@ -994,6 +995,7 @@ <h2 id="thanks">Thank You</h2>
<li class="donor">Nathan S.</li>
<li class="donor">Naturality</li>
<li class="donor">Nicholas R.</li>
<li class="donor">Nigel P.</li>
<li class="donor">Niko's Records</li>
<li>nmussy</li>
<li class="donor">Noah S. <span style="color: #fff;">&#9733;</span></li>
Expand Down
4 changes: 2 additions & 2 deletions html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ <h2>&#x1F44B; Heads up!</h2>
</div> <!-- /.help -->
</div>

<!-- Collection Box Fix -->
<!-- Collection Box Location -->
<div class="toggle-group">
<p class="label">Collection Box Fix</p>
<p class="label">Collection Box Location</p>
<div class="meta hide">in collection wantlist box release page section</div>

<div class="onoffswitch">
Expand Down
12 changes: 7 additions & 5 deletions js/extension/features/collection-box-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ rl.ready(() => {

if ( rl.pageIs('release') ) {

rl.waitForElement('div[class*="wrapper_"] div[class*="buttons_"]').then(() => {
let collectionAndWantlistButtons = 'div[class*="wrapper_"] div[class*="buttons_"]';

let collectionButtons = document.querySelector('div[class*="wrapper_"] div[class*="buttons_"]');
rl.waitForElement(collectionAndWantlistButtons).then(() => {

/* Quick and dirty fix to prevent this from running before the sidebar is ready */
setTimeout(() => {
let collectionButtons = document.querySelector(collectionAndWantlistButtons);

let cBox = collectionButtons.closest('div[class*="side_"'),
info = document.getElementById('release-actions').closest('div[class*="side_"');

cBox.querySelector('br').remove();

info.insertAdjacentElement('afterend', cBox);
}, 100);
});
}
});


document.querySelectorAll('div[class*="wrapper_"] div[class*="buttons_"]');
4 changes: 2 additions & 2 deletions js/popup/change-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
current: [
{
features: [{
name: 'Collection Box Fix',
name: 'Collection Box Location',
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',
}],
Expand All @@ -13,7 +13,7 @@ module.exports = {
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: [],
thanks: ['Huge thank you to Nigel P. and Jarrett for their generous donations!'],
},
],
previous: []
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.11",
"version": "3.6.12",
"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.11",
"version": "3.6.12",
"description": "A Chrome extension that adds useful functionality to Discogs.com! https://www.discogs-enhancer.com",
"main": "index.js",
"scripts": {
Expand Down
Loading