Skip to content

Commit

Permalink
Merge pull request #248 from cosmocode/mm-url-fix
Browse files Browse the repository at this point in the history
Fix media renaming with URL rewriting
  • Loading branch information
michitux authored Jun 28, 2023
2 parents b2e378d + 42c7121 commit 8ba3be2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions script/MoveMediaManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ class MoveMediaManager {
const deleteButton = actionList.querySelector('form#mediamanager__btn_delete');
if (deleteButton === null) continue; // no delete permissions

const uri = link.getAttribute('href');

const [ , paramString ] = uri.split( '?' );
const searchParams = new URLSearchParams(paramString);
const src = searchParams.get('media');

const src = link.textContent;

const moveButton = document.createElement('button');
moveButton.classList.add('move-btn');
Expand Down

0 comments on commit 8ba3be2

Please sign in to comment.