MediaWiki:Gadget-ToolboxTray.js: Difference between revisions
Page last edited 5 months ago by Xeverything11
m 5 revisions imported: Import from SkyWiki |
Replace SkyWiki with WikiOasis |
||
Line 46: | Line 46: | ||
TTUploadText.className = "toolbox-text"; | TTUploadText.className = "toolbox-text"; | ||
TTRecentChangesContainer.setAttribute('href','https://howto. | TTRecentChangesContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:RecentChanges'); | ||
TTRecentChangesIcon.textContent = "schedule"; | TTRecentChangesIcon.textContent = "schedule"; | ||
TTRecentChangesText.textContent = "Recent changes"; | TTRecentChangesText.textContent = "Recent changes"; | ||
TTMyContributionsContainer.setAttribute('href','https://howto. | TTMyContributionsContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:MyContributions'); | ||
TTMyContributionsIcon.textContent = "history"; | TTMyContributionsIcon.textContent = "history"; | ||
TTMyContributionsText.textContent = "My contribs"; | TTMyContributionsText.textContent = "My contribs"; | ||
TTSpecialPagesContainer.setAttribute('href','https://howto. | TTSpecialPagesContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:SpecialPages'); | ||
TTSpecialPagesIcon.textContent = "description"; | TTSpecialPagesIcon.textContent = "description"; | ||
TTSpecialPagesText.textContent = "Special pages"; | TTSpecialPagesText.textContent = "Special pages"; | ||
TTUploadContainer.setAttribute('href','https://howto. | TTUploadContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:Upload'); | ||
TTUploadIcon.textContent = "upload"; | TTUploadIcon.textContent = "upload"; | ||
TTUploadText.textContent = "Upload file"; | TTUploadText.textContent = "Upload file"; |
Revision as of 06:55, 29 April 2025
// Define toolbox tray container
var mwWrapper = document.getElementById("mw-wrapper");
var toolboxTrayContainer = document.createElement("div");
var toolboxTrayButton = document.createElement("button");
var toolboxTrayButtonInner = document.createElement("div");
var toolboxTray = document.createElement("div");
toolboxTrayContainer.id = "toolboxTrayContainer";
toolboxTrayButton.id = "toolboxTrayButton";
toolboxTrayButtonInner.id = "toolboxTrayButtonInner";
toolboxTrayButton.setAttribute('onclick','toggleToolboxTray()');
toolboxTray.id = "toolboxTray";
toolboxTrayButtonInner.textContent = "<";
mwWrapper.append(toolboxTrayContainer);
toolboxTrayContainer.append(toolboxTrayButton);
toolboxTrayButton.append(toolboxTrayButtonInner);
toolboxTrayContainer.append(toolboxTray);
// Define links
var TTRecentChangesContainer = document.createElement("a");
var TTRecentChangesIcon = document.createElement("div");
var TTRecentChangesText = document.createElement("div");
var TTMyContributionsContainer = document.createElement("a");
var TTMyContributionsIcon = document.createElement("div");
var TTMyContributionsText = document.createElement("div");
var TTSpecialPagesContainer = document.createElement("a");
var TTSpecialPagesIcon = document.createElement("div");
var TTSpecialPagesText = document.createElement("div");
var TTUploadContainer = document.createElement("a");
var TTUploadIcon = document.createElement("div");
var TTUploadText = document.createElement("div");
TTRecentChangesContainer.className = "toolbox-container";
TTRecentChangesIcon.className = "toolbox-icon";
TTRecentChangesText.className = "toolbox-text";
TTMyContributionsContainer.className = "toolbox-container";
TTMyContributionsIcon.className = "toolbox-icon";
TTMyContributionsText.className = "toolbox-text";
TTSpecialPagesContainer.className = "toolbox-container";
TTSpecialPagesIcon.className = "toolbox-icon";
TTSpecialPagesText.className = "toolbox-text";
TTUploadContainer.className = "toolbox-container";
TTUploadIcon.className = "toolbox-icon";
TTUploadText.className = "toolbox-text";
TTRecentChangesContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:RecentChanges');
TTRecentChangesIcon.textContent = "schedule";
TTRecentChangesText.textContent = "Recent changes";
TTMyContributionsContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:MyContributions');
TTMyContributionsIcon.textContent = "history";
TTMyContributionsText.textContent = "My contribs";
TTSpecialPagesContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:SpecialPages');
TTSpecialPagesIcon.textContent = "description";
TTSpecialPagesText.textContent = "Special pages";
TTUploadContainer.setAttribute('href','https://howto.wikioasis.org/wiki/Special:Upload');
TTUploadIcon.textContent = "upload";
TTUploadText.textContent = "Upload file";
toolboxTray.append(TTRecentChangesContainer);
TTRecentChangesContainer.append(TTRecentChangesIcon);
TTRecentChangesContainer.append(TTRecentChangesText);
toolboxTray.append(TTMyContributionsContainer);
TTMyContributionsContainer.append(TTMyContributionsIcon);
TTMyContributionsContainer.append(TTMyContributionsText);
toolboxTray.append(TTSpecialPagesContainer);
TTSpecialPagesContainer.append(TTSpecialPagesIcon);
TTSpecialPagesContainer.append(TTSpecialPagesText);
toolboxTray.append(TTUploadContainer);
TTUploadContainer.append(TTUploadIcon);
TTUploadContainer.append(TTUploadText);