| @@ -598,7 +598,6 @@ i.far { | |||
| #spawners > select, | |||
| #spawners > button { | |||
| padding-top: 2pt; | |||
| display: none; | |||
| } | |||
| @@ -724,13 +723,11 @@ i.far { | |||
| button { | |||
| border: 3px; | |||
| border-style: outset; | |||
| border-color: gray; | |||
| padding: 5px; | |||
| background: #eee; | |||
| } | |||
| button:hover { | |||
| background: #ccc; | |||
| background: #555; | |||
| } | |||
| button:enabled:active { | |||
| border-style: inset; | |||
| @@ -841,6 +838,7 @@ button:enabled:active { | |||
| left: 50%; | |||
| transform: translate(-50%, -50%); | |||
| } | |||
| #help-contents-holder { | |||
| flex: 1 1 70%; | |||
| background: #333; | |||
| @@ -893,4 +891,38 @@ button:enabled:active { | |||
| width: 80%; | |||
| max-width: 60em; | |||
| height: 60pt; | |||
| } | |||
| } | |||
| .nsfw { | |||
| color: red; | |||
| font-style: bold; | |||
| } | |||
| select { | |||
| background: #111; | |||
| color: #eee; | |||
| border-color: #444; | |||
| } | |||
| select > option { | |||
| color: #eee; | |||
| } | |||
| button:focus, | |||
| select:focus, | |||
| input:focus { | |||
| outline-color: #eee; | |||
| } | |||
| input { | |||
| background: #111; | |||
| color: #eee; | |||
| border-color: #444; | |||
| } | |||
| button { | |||
| background: #111; | |||
| color: #ddd; | |||
| border-color: #666; | |||
| } | |||
| @@ -372,6 +372,7 @@ function createEntityMaker(info, views, sizes) { | |||
| maker.constructor = () => makeEntity(info, views, sizes); | |||
| maker.authors = []; | |||
| maker.owners = []; | |||
| maker.nsfw = false; | |||
| Object.values(views).forEach(view => { | |||
| const authors = authorsOf(view.image.source); | |||
| @@ -390,6 +391,10 @@ function createEntityMaker(info, views, sizes) { | |||
| } | |||
| }); | |||
| } | |||
| if (isNsfw(view.image.source)) { | |||
| maker.nsfw = true; | |||
| } | |||
| }); | |||
| return maker; | |||
| @@ -595,11 +600,32 @@ function configViewList(entity, selectedView) { | |||
| option.innerText = entity.views[view].name; | |||
| option.value = view; | |||
| if (isNsfw(entity.views[view].image.source)) { | |||
| option.classList.add("nsfw") | |||
| } | |||
| if (view === selectedView) { | |||
| option.selected = true; | |||
| if (option.classList.contains("nsfw")) { | |||
| list.classList.add("nsfw"); | |||
| } else { | |||
| list.classList.remove("nsfw"); | |||
| } | |||
| } | |||
| list.appendChild(option); | |||
| }); | |||
| list.addEventListener("change", e => { | |||
| if (list.options[list.selectedIndex].classList.contains("nsfw")) { | |||
| list.classList.add("nsfw"); | |||
| } else { | |||
| list.classList.remove("nsfw"); | |||
| } | |||
| }) | |||
| } | |||
| function clearViewList() { | |||
| @@ -2014,9 +2040,21 @@ function prepareEntities() { | |||
| option.innerText = entity.name; | |||
| select.appendChild(option); | |||
| if (entity.nsfw) { | |||
| option.classList.add("nsfw"); | |||
| } | |||
| availableEntitiesByName[entity.name] = entity; | |||
| }; | |||
| select.addEventListener("change", e => { | |||
| if (select.options[select.selectedIndex].classList.contains("nsfw")) { | |||
| select.classList.add("nsfw"); | |||
| } else { | |||
| select.classList.remove("nsfw"); | |||
| } | |||
| }) | |||
| const button = document.createElement("button"); | |||
| button.id = "create-entity-" + category + "-button"; | |||
| @@ -2172,11 +2172,11 @@ const attributionData = { | |||
| { | |||
| prefix: "./media/characters/elbial/", | |||
| files: [ | |||
| { name: "front.svg", source: "https://www.furaffinity.net/view/15459294/" }, | |||
| { name: "side.svg", source: "https://www.furaffinity.net/view/15459294/" }, | |||
| { name: "back.svg", source: "https://www.furaffinity.net/view/15459294/" }, | |||
| { name: "front.svg", source: "https://www.furaffinity.net/view/15459294/", nsfw: true }, | |||
| { name: "side.svg", source: "https://www.furaffinity.net/view/15459294/", nsfw: true }, | |||
| { name: "back.svg", source: "https://www.furaffinity.net/view/15459294/", nsfw: true }, | |||
| { name: "front-dressed.svg", source: "https://www.furaffinity.net/view/15459294/" }, | |||
| { name: "genitals.svg", source: "https://www.furaffinity.net/view/15459294/" }, | |||
| { name: "genitals.svg", source: "https://www.furaffinity.net/view/15459294/", nsfw: true }, | |||
| ], | |||
| authors: [ | |||
| "homogeneousrule" | |||
| @@ -12882,7 +12882,8 @@ function prepareAttribution() { | |||
| attribution.files[citation.prefix + file.name] = { | |||
| authors: citation.authors, | |||
| owners: citation.owners, | |||
| source: file.source | |||
| source: file.source, | |||
| nsfw: file.nsfw | |||
| } | |||
| }) | |||
| } | |||
| @@ -12998,4 +12999,12 @@ function sourceOf(file) { | |||
| } | |||
| } | |||
| function isNsfw(file) { | |||
| if (attribution.files[file]) { | |||
| return attribution.files[file].nsfw === true; | |||
| } | |||
| return false; | |||
| } | |||
| prepareAttribution(); | |||