Skip to content

Commit

Permalink
🤖 mb_caa_dimensions 2024.9.8
Browse files Browse the repository at this point in the history
fix(caa dims): don't displace arrows on queued uploads (#795)
  • Loading branch information
github-actions[bot] committed Sep 8, 2024
1 parent f0c1858 commit 12195f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions mb_caa_dimensions.changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- **2024.9.8**: Bug fix: don't displace arrows on queued uploads ([#795](https://github.com/ROpdebee/mb-userscripts/pull/795))
- **2024.7.26**: Bug fix: remove extraneous spacing in JSX-transpiled HTML ([#781](https://github.com/ROpdebee/mb-userscripts/pull/781))
- **2024.7.25**: New feature: add support for new event art archive (EAA) ([#779](https://github.com/ROpdebee/mb-userscripts/pull/779))
- **2024.6.10**: Bug fix: compatibility with new beta.MBS ([#770](https://github.com/ROpdebee/mb-userscripts/pull/770))
Expand Down
2 changes: 1 addition & 1 deletion mb_caa_dimensions.meta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name MB: Display CAA image dimensions
// @description Displays the dimensions and size of images in the cover art archive.
// @version 2024.7.26
// @version 2024.9.8
// @author ROpdebee
// @license MIT; https://opensource.org/licenses/MIT
// @namespace https://github.com/ROpdebee/mb-userscripts
Expand Down
2 changes: 1 addition & 1 deletion mb_caa_dimensions.metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"2024.7.26"}
{"version":"2024.9.8"}
11 changes: 7 additions & 4 deletions mb_caa_dimensions.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name MB: Display CAA image dimensions
// @description Displays the dimensions and size of images in the cover art archive.
// @version 2024.7.26
// @version 2024.9.8
// @author ROpdebee
// @license MIT; https://opensource.org/licenses/MIT
// @namespace https://github.com/ROpdebee/mb-userscripts
Expand Down Expand Up @@ -277,10 +277,12 @@
return details.join(', ');
}
class BaseDisplayedImage {
constructor(imageElement) {
constructor(imageElement, labelPlacementAnchor) {
_defineProperty(this, 'imageElement', void 0);
_defineProperty(this, '_labelPlacementAnchor', void 0);
_defineProperty(this, '_dimensionsSpan', null);
_defineProperty(this, '_fileInfoSpan', null);
this._labelPlacementAnchor = labelPlacementAnchor ?? imageElement;
this.imageElement = imageElement;
}
get dimensionsSpan() {
Expand All @@ -294,7 +296,7 @@
$$a.setAttribute('class', 'ROpdebee_dimensions');
return $$a;
}.call(this);
this.imageElement.insertAdjacentElement('afterend', this._dimensionsSpan);
this._labelPlacementAnchor.insertAdjacentElement('afterend', this._dimensionsSpan);
return this._dimensionsSpan;
}
get fileInfoSpan() {
Expand Down Expand Up @@ -379,7 +381,8 @@
}
class DisplayedQueuedUploadImage extends BaseDisplayedImage {
constructor(imageElement) {
super(imageElement);
var _imageElement$parentE;
super(imageElement, (_imageElement$parentE = imageElement.parentElement) === null || _imageElement$parentE === void 0 ? void 0 : _imageElement$parentE.lastElementChild);
_defineProperty(this, 'image', void 0);
this.image = new QueuedUploadImage(imageElement);
}
Expand Down

0 comments on commit 12195f4

Please sign in to comment.