MediaWiki

Gadget-editButton.js

From Dogcraft Wiki

Revision as of 00:28, 6 September 2024 by Domino (talk | contribs) (Created page with "$( function () { var wikiEdit = document.createElement("a"); wikiEdit.setAttribute("id", "wikiEdit"); wikiEdit.setAttribute("class", "button"); var wikiEditButton = document.createElement("button"); wikiEdit.appendChild(wikiEditButton); var wikiEditButtonIcon = document.createElement("i"); wikiEditButtonIcon.setAttribute("class", "fas fa-pencil"); wikiEditButton.appendChild(wikiEditButtonIcon); var wikiEditButtonLabel = document.createElement("span"); wik...")
(diff) โ† Older revision | Latest revision (diff) | Newer revision โ†’ (diff)

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
$( function () {
	var wikiEdit = document.createElement("a");
	wikiEdit.setAttribute("id", "wikiEdit");
	wikiEdit.setAttribute("class", "button");
	
	var wikiEditButton = document.createElement("button");
	wikiEdit.appendChild(wikiEditButton);
	
	var wikiEditButtonIcon = document.createElement("i");
	wikiEditButtonIcon.setAttribute("class", "fas fa-pencil");
	wikiEditButton.appendChild(wikiEditButtonIcon);
	
	var wikiEditButtonLabel = document.createElement("span");
	wikiEditButtonLabel.innerText = " Edit";
	wikiEditButton.appendChild(wikiEditButtonLabel);
	
	document.getElementById("wikiActions").before(wikiEdit);
})
This page was last modified on 6 September 2024, at 00:28. (2 months ago)