JSFiddle - React, Tailwind, and code Playground

by LuckyCat

JavaScript

javascript: void(function() {
  const locale = Array.from(document.querySelectorAll('input[type="checkbox"]')).filter((checkbox) => checkbox.checked).map((checkbox) => checkbox.value);
  var textArea = document.createElement("textarea");
  for (var j = 0; j < locale.length; j++) {
    textArea.value += locale[j] + ',';
  }
  document.body.insertBefore(textArea, document.body.firstChild);
  textArea.focus();
  textArea.select();
  var successful = document.execCommand('copy');
  var msg = successful ? 'successful' : 'unsuccessful';
  textArea.remove();
  textArea.remove();
})();