Skip to content

Commit

Permalink
fix double element bug
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Nov 10, 2023
1 parent b817b9f commit 37326b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions twinkle.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ Twinkle.addPortlet = function(navigation, id, text, type, nextnodeid) {
// The Twinkle dropdown menu has been added to the left of p-cactions. Move it to the right.
$('#p-twinkle').insertAfter('#p-cactions');
} else if (mw.config.get('skin') === 'vector-2022') {
$('#p-twinkle-dropdown').insertAfter('.vector-page-tools-landmark');
// this creates two #p-twinkle-dropdowns for some reason, in different spots on the DOM. maybe some JS in vector 2022? delete the bad one:
$('.vector-column-end > #p-twinkle-dropdown').remove();
portlet = $('#p-twinkle-dropdown');
return $('#p-twinkle-dropdown').detach().insertAfter('.vector-page-tools-landmark');
}

return portlet;
Expand Down

0 comments on commit 37326b7

Please sign in to comment.