less copy protection, more size visualization
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

210 строки
5.6 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/tiberius/",
  88. files: [
  89. { name: "front.svg", source: "https://www.furaffinity.net/view/34977812/"},
  90. { name: "back.svg", source: "https://www.furaffinity.net/view/34977812/"}
  91. ],
  92. authors: [
  93. "Rebonica"
  94. ],
  95. owners: [
  96. "movler"
  97. ]
  98. },
  99. {
  100. prefix: "./media/characters/",
  101. files: [
  102. { name: "", source: ""}
  103. ],
  104. authors: [
  105. ]
  106. },
  107. {
  108. prefix: "./media/characters/",
  109. files: [
  110. { name: "", source: ""}
  111. ],
  112. authors: [
  113. ]
  114. }
  115. ],
  116. authors: {
  117. "cardboardhead": {
  118. name: "cardboardhead",
  119. url: "https://twitter.com/cardboardhead"
  120. },
  121. "chemicalcrux": {
  122. name: "chemicalcrux",
  123. url: "https://www.furaffinity.net/user/chemicalcrux"
  124. },
  125. "clown-grin": {
  126. name: "clown-grin",
  127. url: "https://www.furaffinity.net/user/clown-grin"
  128. },
  129. "Dialuca01": {
  130. name: "Dialuca",
  131. url: "https://www.furaffinity.net/user/dialuca01"
  132. },
  133. "just-a-little-mixed-up": {
  134. name: "just-a-little-mixed-up",
  135. url: "https://www.furaffinity.net/user/just-a-little-mixed-up"
  136. },
  137. "labratkuma": {
  138. name: "labratkuma",
  139. url: "https://www.furaffinity.net/user/labratkuma"
  140. },
  141. "movler": {
  142. name: "Movler",
  143. url: "https://www.furaffinity.net/user/movler/"
  144. },
  145. "oselotti": {
  146. name: "Oselotti",
  147. url: "https://www.furaffinity.net/user/oselotti"
  148. },
  149. "Rebonica": {
  150. name: "Rebonica",
  151. url: "https://www.furaffinity.net/user/rebonica"
  152. },
  153. "spyropurple": {
  154. name: "spyropurple",
  155. url: "https://www.furaffinity.net/user/spyropurple/"
  156. }
  157. }
  158. }
  159. const attribution = {};
  160. function prepareAttribution() {
  161. attribution["files"] = {};
  162. attributionData.sources.forEach(citation => {
  163. citation.files.forEach(file => {
  164. attribution.files[citation.prefix + file.name] = {
  165. authors: citation.authors,
  166. source: file.source
  167. }
  168. })
  169. });
  170. }
  171. function authorsOf(file) {
  172. if (attribution.files[file])
  173. return attribution.files[file].authors;
  174. else
  175. return undefined;
  176. }
  177. function authorsOfFull(file) {
  178. if (attribution.files[file]) {
  179. const result = [];
  180. attribution.files[file].authors.forEach(author => {
  181. result.push(attributionData.authors[author]);
  182. });
  183. return result;
  184. }
  185. else
  186. return undefined;
  187. }
  188. function sourceOf(file) {
  189. if (attribution.files[file])
  190. return attribution.files[file].source;
  191. else
  192. return undefined;
  193. }
  194. prepareAttribution();