FANDOM


Here, you can easily import scripts:

  • from your local community by article name - e.g. MyScript.js
  • from dev.wikia.com by article name, preceded by "dev:" - e.g. dev:Code.js

Names should not contain the MediaWiki namespace prefix. Write each script on a new line. See Help:Including additional CSS and JS for more information.


dev:DiscordIntegrator/code.js
dev:CopyText/code.js
$('body').on('click', '.copy-to-clipboard-button', function(e){

   var text = $(this).data('text'),
   $input = $('<input>', { type: 'text' })
       .val($('.copy-to-clipboard-text[data-text="' + text + '"]').first().text())
       .appendTo('body')
       .select();
   document.execCommand('Copy');
   $input.remove();

});
Community content is available under CC-BY-SA unless otherwise noted.