FANDOM


CopyCodeButton is a script which purpose is to add the copy button into syntax highlight area. Currently, it works with certain syntaxhighlight blocks only (JavaScript ones on Fandom Developers Wiki). In the future, it's planned to add support of other languages, too.

Installation

Configuration

This script is initially made for Fandom Developers Wiki, however you can use configuration variables to add it to other wikis. They're not needed on this wiki, though.

Element where you want to add the copy button
window.copyButtonPosition = "selector here";
Syntaxhighlight area with the content you need to copy
Note: This configuration variable might become deprecated. It allows you to copy blocks of any language, but just one of all.
window.syntaxHighLightArea = "selector here";

Changelog

August 9, 2018 (v1.0.0)
Lady Furude: Initial version.
August 17, 2018 (v1.1.0)
Lady Furude: Support of i18n and configuration variables for using the script on other wikis.
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+