MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
(testing player character tooltip)
 
(javascript bad)
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
function getPlayerCharacterHexColor() {
  var copyText = document.getElementById("playerCharacterHexColor");
  copyText.select();
  copyText.setSelectionRange(0, 99999);
  navigator.clipboard.writeText(copyText.value);
 
  var tooltip = document.getElementById("playerCharacterToolTip");
  tooltip.innerHTML = "Copied: " + copyText.value;
}
function outOfToolTipFunc() {
  var tooltip = document.getElementById("playerCharacterToolTip");
  tooltip.innerHTML = "Copy to clipboard";
}

Latest revision as of 09:03, 29 November 2021

/* Any JavaScript here will be loaded for all users on every page load. */