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

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