MediaWiki:Gadget-ToolboxTray.js: Difference between revisions
Page last edited 5 months ago by Xeverything11
another |
4th |
||
Line 28: | Line 28: | ||
var TTSpecialPagesIcon = document.createElement("div"); | var TTSpecialPagesIcon = document.createElement("div"); | ||
var TTSpecialPagesText = 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"; | TTRecentChangesContainer.className = "toolbox-container"; | ||
Line 38: | Line 42: | ||
TTSpecialPagesIcon.className = "toolbox-icon"; | TTSpecialPagesIcon.className = "toolbox-icon"; | ||
TTSpecialPagesText.className = "toolbox-text"; | TTSpecialPagesText.className = "toolbox-text"; | ||
TTUploadContainer.className = "toolbox-container"; | |||
TTUploadIcon.className = "toolbox-icon"; | |||
TTUploadText.className = "toolbox-text"; | |||
TTRecentChangesContainer.setAttribute('href','https://howto.skywiki.org/wiki/Special:RecentChanges'); | TTRecentChangesContainer.setAttribute('href','https://howto.skywiki.org/wiki/Special:RecentChanges'); | ||
Line 48: | Line 55: | ||
TTSpecialPagesIcon.textContent = "description"; | TTSpecialPagesIcon.textContent = "description"; | ||
TTSpecialPagesText.textContent = "Special pages"; | TTSpecialPagesText.textContent = "Special pages"; | ||
TTUploadContainer.setAttribute('href','https://howto.skywiki.org/wiki/Special:Upload'); | |||
TTUploadIcon.textContent = "upload"; | |||
TTUploadText.textContent = "Upload file"; | |||
toolboxTray.append(TTRecentChangesContainer); | toolboxTray.append(TTRecentChangesContainer); | ||
Line 58: | Line 68: | ||
TTSpecialPagesContainer.append(TTSpecialPagesIcon); | TTSpecialPagesContainer.append(TTSpecialPagesIcon); | ||
TTSpecialPagesContainer.append(TTSpecialPagesText); | TTSpecialPagesContainer.append(TTSpecialPagesText); | ||
toolboxTray.append(TTUploadContainer); | |||
TTUploadContainer.append(TTUploadIcon); | |||
TTUploadContainer.append(TTUploadText); |
Revision as of 18:20, 14 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.skywiki.org/wiki/Special:RecentChanges');
TTRecentChangesIcon.textContent = "schedule";
TTRecentChangesText.textContent = "Recent changes";
TTMyContributionsContainer.setAttribute('href','https://howto.skywiki.org/wiki/Special:MyContributions');
TTMyContributionsIcon.textContent = "history";
TTMyContributionsText.textContent = "My contribs";
TTSpecialPagesContainer.setAttribute('href','https://howto.skywiki.org/wiki/Special:SpecialPages');
TTSpecialPagesIcon.textContent = "description";
TTSpecialPagesText.textContent = "Special pages";
TTUploadContainer.setAttribute('href','https://howto.skywiki.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);