mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-25 08:54:17 -05:00
Remove jQuery .attr
from the image diff (#29917)
- Switched from jQuery `.attr` to plain javascript `.setAttribute` - Tested the image diff functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> (cherry picked from commit cb98e27992cae7d62e527e922cae3c0f738a7cab)
This commit is contained in:
parent
f9546aa0f2
commit
32cef22bfd
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ export function initImageDiff() {
|
||||||
|
|
||||||
$('.image-diff:not([data-image-diff-loaded])').each(async function() {
|
$('.image-diff:not([data-image-diff-loaded])').each(async function() {
|
||||||
const $container = $(this);
|
const $container = $(this);
|
||||||
$container.attr('data-image-diff-loaded', 'true');
|
this.setAttribute('data-image-diff-loaded', 'true');
|
||||||
|
|
||||||
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
|
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
|
||||||
const diffContainerWidth = Math.max($container.closest('.diff-file-box').width() - 300, 100);
|
const diffContainerWidth = Math.max($container.closest('.diff-file-box').width() - 300, 100);
|
||||||
|
|
Loading…
Reference in a new issue