less copy protection, more size visualization
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

250 líneas
6.8 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/surgo/",
  88. files: [
  89. { name: "front.svg", source: "https://www.furaffinity.net/view/33348481/"},
  90. { name: "back.svg", source: "https://www.furaffinity.net/view/33348481/"},
  91. { name: "laying.svg", source: "https://www.furaffinity.net/view/33348481/"},
  92. ],
  93. authors: [
  94. "gaiawolfess",
  95. "malakhael"
  96. ],
  97. owners: [
  98. "movler"
  99. ]
  100. },
  101. {
  102. prefix: "./media/characters/tiberius/",
  103. files: [
  104. { name: "front.svg", source: "https://www.furaffinity.net/view/34977812/"},
  105. { name: "back.svg", source: "https://www.furaffinity.net/view/34977812/"}
  106. ],
  107. authors: [
  108. "Rebonica"
  109. ],
  110. owners: [
  111. "movler"
  112. ]
  113. },
  114. {
  115. prefix: "./media/characters/",
  116. files: [
  117. { name: "", source: ""}
  118. ],
  119. authors: [
  120. ]
  121. }
  122. ],
  123. people: {
  124. "cardboardhead": {
  125. name: "cardboardhead",
  126. url: "https://twitter.com/cardboardhead"
  127. },
  128. "chemicalcrux": {
  129. name: "chemicalcrux",
  130. url: "https://www.furaffinity.net/user/chemicalcrux"
  131. },
  132. "clown-grin": {
  133. name: "clown-grin",
  134. url: "https://www.furaffinity.net/user/clown-grin"
  135. },
  136. "Dialuca01": {
  137. name: "Dialuca",
  138. url: "https://www.furaffinity.net/user/dialuca01"
  139. },
  140. "gaiawolfess": {
  141. name: "Gaiawolfess",
  142. url: "https://www.furaffinity.net/user/gaiawolfess"
  143. },
  144. "just-a-little-mixed-up": {
  145. name: "just-a-little-mixed-up",
  146. url: "https://www.furaffinity.net/user/just-a-little-mixed-up"
  147. },
  148. "labratkuma": {
  149. name: "labratkuma",
  150. url: "https://www.furaffinity.net/user/labratkuma"
  151. },
  152. "malakhael": {
  153. name: "Malakhael",
  154. url: "https://www.furaffinity.net/user/malakhael"
  155. },
  156. "movler": {
  157. name: "Movler",
  158. url: "https://www.furaffinity.net/user/movler/"
  159. },
  160. "oselotti": {
  161. name: "Oselotti",
  162. url: "https://www.furaffinity.net/user/oselotti"
  163. },
  164. "Rebonica": {
  165. name: "Rebonica",
  166. url: "https://www.furaffinity.net/user/rebonica"
  167. },
  168. "spyropurple": {
  169. name: "spyropurple",
  170. url: "https://www.furaffinity.net/user/spyropurple/"
  171. }
  172. }
  173. }
  174. const attribution = {};
  175. function prepareAttribution() {
  176. attribution["files"] = {};
  177. attributionData.sources.forEach(citation => {
  178. citation.files.forEach(file => {
  179. attribution.files[citation.prefix + file.name] = {
  180. authors: citation.authors,
  181. owners: citation.owners,
  182. source: file.source
  183. }
  184. })
  185. });
  186. }
  187. function authorsOf(file) {
  188. if (attribution.files[file])
  189. return attribution.files[file].authors;
  190. else
  191. return undefined;
  192. }
  193. function authorsOfFull(file) {
  194. if (attribution.files[file]) {
  195. const result = [];
  196. attribution.files[file].authors.forEach(author => {
  197. result.push(attributionData.people[author]);
  198. });
  199. return result;
  200. }
  201. else
  202. return undefined;
  203. }
  204. function ownersOf(file) {
  205. if (attribution.files[file])
  206. return attribution.files[file].owners;
  207. else
  208. return undefined;
  209. }
  210. function ownersOfFull(file) {
  211. if (attribution.files[file]) {
  212. if (attribution.files[file].owners !== undefined) {
  213. const result = [];
  214. attribution.files[file].owners.forEach(owner => {
  215. result.push(attributionData.people[owner]);
  216. });
  217. return result;
  218. } else {
  219. return [];
  220. }
  221. }
  222. else
  223. return undefined;
  224. }
  225. function sourceOf(file) {
  226. if (attribution.files[file])
  227. return attribution.files[file].source;
  228. else
  229. return undefined;
  230. }
  231. prepareAttribution();