Skip to content

Instantly share code, notes, and snippets.

@nuadaria
Created March 31, 2022 23:47
Show Gist options
  • Save nuadaria/9915728dc272dc61a193bb37cb0d22f7 to your computer and use it in GitHub Desktop.
Save nuadaria/9915728dc272dc61a193bb37cb0d22f7 to your computer and use it in GitHub Desktop.
Physical Characteristics
if(!document.getElementById("templateButtonDescription") && window.location.href.includes("/characters/new")){
var link = document.createElement("a");
link.id = "templateButtonDescription";
link.setAttribute("href", "#");
link.classList.add("button");
link.onclick = function(e){
e.preventDefault();
document.getElementById("game_character_description").innerHTML = "Physical Characteristics:\n"
+"Color of Eyes\n"
+"The color of Hair:\n"
+"The color of Skin:\n"
+"Is he/she wearing Glasses?\n"
+"Is the character healthy or does he have any diseases?\n"
+"Type of Face:\n"
+"Weight:\n"
+"What’s the style of the character? (modern, outmoded):\n\n"
+"Addictions:\n"
+"Bad Habits:\n\n"
+"Dialect\n"
+"Does the character drink regularly?\n"
+"Does the character have any disabilities?\n"
+"Does the character prefer any proverbs?\n"
+"Does the character smoke?\n"
+"Good Habits:\n"
+"Height:\n"
+"Hobbies:";
};
document.getElementsByClassName("embed-buttons")[0].appendChild(link);
var span = document.createElement("span");
span.classList.add("op-icon-gears");
document.getElementById("templateButtonDescription").appendChild(span);
var span = document.createElement("span");
span.classList.add("embed-text");
span.innerHTML = "Character Template";
document.getElementById("templateButtonDescription").appendChild(span);
}
@nuadaria
Copy link
Author

Inserts a button on the new character page that will pre pop the Description field with a template like form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment