less copy protection, more size visualization
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

198 lines
5.2 KiB

  1. const attributionData = {
  2. sources: [
  3. {
  4. prefix: "./media/buildings/",
  5. files: [
  6. { name: "house.svg", source: null },
  7. { name: "mailbox.svg", source: null },
  8. { name: "mobile-home.svg", source: null },
  9. ],
  10. authors: [
  11. "chemicalcrux"
  12. ]
  13. },
  14. {
  15. prefix: "./media/buildings/skyscrapers/",
  16. files: [
  17. { name: "wide.svg", source: null },
  18. { name: "medium.svg", source: null },
  19. { name: "slender.svg", source: null },
  20. { name: "narrow.svg", source: null },
  21. ],
  22. authors: [
  23. "chemicalcrux"
  24. ]
  25. },
  26. {
  27. prefix: "./media/characters/abysgar/",
  28. files: [
  29. { name: "front.svg", source: "https://www.furaffinity.net/view/32424108/"}
  30. ],
  31. authors: [
  32. "clown-grin",
  33. "labratkuma"
  34. ],
  35. owners: [
  36. ]
  37. },
  38. {
  39. prefix: "./media/characters/adake/",
  40. files: [
  41. { name: "front-1.svg", source: "https://www.furaffinity.net/view/26253324/"},
  42. { name: "front-2.svg", source: "https://www.furaffinity.net/view/26253324/"},
  43. { name: "back.svg", source: "https://www.furaffinity.net/view/26253324/"},
  44. { name: "kneel.svg", source: "https://www.furaffinity.net/view/26253324/"},
  45. ],
  46. authors: [
  47. "oselotti"
  48. ],
  49. owners: [
  50. "Dialuca01"
  51. ]
  52. },
  53. {
  54. prefix: "./media/characters/aigey/",
  55. files: [
  56. { name: "side.svg", source: "https://www.furaffinity.net/view/12006265/"}
  57. ],
  58. authors: [
  59. "just-a-little-mixed-up"
  60. ],
  61. owners: [
  62. ]
  63. },
  64. {
  65. prefix: "./media/characters/akari/",
  66. files: [
  67. { name: "front.svg", source: "https://www.furaffinity.net/view/21329356/"}
  68. ],
  69. authors: [
  70. "spyropurple"
  71. ],
  72. owners: [
  73. ]
  74. },
  75. {
  76. prefix: "./media/characters/andy/",
  77. files: [
  78. { name: "front.svg", source: null}
  79. ],
  80. authors: [
  81. "cardboardhead"
  82. ],
  83. owners: [
  84. ]
  85. },
  86. {
  87. prefix: "./media/characters/",
  88. files: [
  89. { name: "", source: ""}
  90. ],
  91. authors: [
  92. ]
  93. },
  94. {
  95. prefix: "./media/characters/",
  96. files: [
  97. { name: "", source: ""}
  98. ],
  99. authors: [
  100. ]
  101. },
  102. {
  103. prefix: "./media/characters/",
  104. files: [
  105. { name: "", source: ""}
  106. ],
  107. authors: [
  108. ]
  109. }
  110. ],
  111. authors: {
  112. "cardboardhead": {
  113. name: "cardboardhead",
  114. url: "https://twitter.com/cardboardhead"
  115. },
  116. "chemicalcrux": {
  117. name: "chemicalcrux",
  118. url: "https://www.furaffinity.net/user/chemicalcrux"
  119. },
  120. "clown-grin": {
  121. name: "clown-grin",
  122. url: "https://www.furaffinity.net/user/clown-grin"
  123. },
  124. "Dialuca01": {
  125. name: "Dialuca",
  126. url: "https://www.furaffinity.net/user/dialuca01"
  127. }
  128. "just-a-little-mixed-up": {
  129. name: "just-a-little-mixed-up",
  130. url: "https://www.furaffinity.net/user/just-a-little-mixed-up"
  131. },
  132. "labratkuma": {
  133. name: "labratkuma",
  134. url: "https://www.furaffinity.net/user/labratkuma"
  135. },
  136. "oselotti": {
  137. name: "Oselotti",
  138. url: "https://www.furaffinity.net/user/oselotti"
  139. },
  140. "spyropurple": {
  141. name: "spyropurple",
  142. url: "https://www.furaffinity.net/user/spyropurple/"
  143. }
  144. }
  145. }
  146. const attribution = {};
  147. function prepareAttribution() {
  148. attribution["files"] = {};
  149. attributionData.sources.forEach(citation => {
  150. citation.files.forEach(file => {
  151. attribution.files[citation.prefix + file.name] = {
  152. authors: citation.authors,
  153. source: file.source
  154. }
  155. })
  156. });
  157. }
  158. function authorsOf(file) {
  159. if (attribution.files[file])
  160. return attribution.files[file].authors;
  161. else
  162. return undefined;
  163. }
  164. function authorsOfFull(file) {
  165. if (attribution.files[file]) {
  166. const result = [];
  167. attribution.files[file].authors.forEach(author => {
  168. result.push(attributionData.authors[author]);
  169. });
  170. return result;
  171. }
  172. else
  173. return undefined;
  174. }
  175. function sourceOf(file) {
  176. if (attribution.files[file])
  177. return attribution.files[file].source;
  178. else
  179. return undefined;
  180. }
  181. prepareAttribution();