MediaWiki:Gadget-rightpanel.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
~function() {
// document.documentElement.classList.add('gadget-rightpanel-active'); // currently unused
const panel = document.getElementById('mw-panel');
console.log(panel);
const rightPanel = document.createElement("div");
rightPanel.id = "gadget-rightpanel-panel";
panel.append(rightPanel);
// move things from left to right
const toolbox = panel.querySelector('#p-tb');
if(toolbox) rightPanel.append(toolbox);
setTimeout(function () { // wait because this is created by another gadget and i'm lazy
const toc = panel.querySelector('#p-toc');
if (toc) rightPanel.append(toc);
}, 1000);
}();