BioTorrents.de’s version of Gazelle
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.

upload.js 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. function DisplayTrans() {
  2. if (['Softsubs','Hardsubs'].indexOf($('select[name="sub"]').raw().value) != -1) {
  3. $('#subber').raw().parentNode.parentNode.style.display = 'table-row'
  4. } else {
  5. $('#subber').raw().parentNode.parentNode.style.display = 'none'
  6. }
  7. }
  8. function Categories() {
  9. /*
  10. let def = ['title', 'title_rj', 'title_jp', 'year', 'lang', 'censored', 'tags', 'cover', 'group_desc', 'release_desc', 'anon']
  11. let cats = [{
  12. 'javdb': {},
  13. 'idols': {name: 'Idol(s)'},
  14. 'studio': {name: 'Studio'},
  15. 'series': {name: 'Series'},
  16. 'media': {},
  17. 'container': {},
  18. 'codec': {},
  19. 'resolution': {},
  20. 'audio': {},
  21. 'sub': {},
  22. 'mediainfo': {},
  23. 'screenshots': {name: 'Screenshots'},
  24. 'group_desc': {notes: 'Contains information such as a description of the movie, a link to a JAV catalogue, etc.'},
  25. 'release_desc': {notes: 'Contains information such as encoder settings or watermarks'}
  26. }, {
  27. 'anidb': {},
  28. 'idols': {name: 'Artist/Studio'},
  29. 'studio': false,
  30. 'series': {name: 'Circle (Optional)'},
  31. 'media': {},
  32. 'container': {},
  33. 'codec': {},
  34. 'resolution': {},
  35. 'audio': {},
  36. 'sub': {},
  37. 'trans': {name: 'Translation Group (optional)'},
  38. 'mediainfo': {},
  39. 'tags': {notes: 'Remember to use the \'3d\' tag if your upload is 3DCG!'},
  40. 'screenshots': {name: 'Screenshots'},
  41. 'group_desc': {notes: 'Contains information such as a description of the anime, a link to AniDB, etc.'},
  42. 'release_desc': {notes: 'Contains information such as encoder settings or episode source differences'}
  43. }, {
  44. 'ehentai': {},
  45. 'idols': {name: 'Artist'},
  46. 'studio': {name: 'Publisher (Optional)'},
  47. 'series': {name: 'Circle (Optional)'},
  48. 'pages': {},
  49. 'media_manga': {},
  50. 'archive_manga': {},
  51. 'trans': {name: 'Translation Group (optional)'},
  52. 'screenshots': {name: 'Samples'},
  53. 'group_desc': {notes: 'Contains information such as a description of the doujin.'},
  54. 'release_desc': {notes: 'Contains information such as formatting information.'}
  55. }, {
  56. 'idols': {name: 'Developer'},
  57. 'series': {name: 'Circle (Optional)'},
  58. 'studio': {name: 'Publisher (Optional)'},
  59. 'dlsite': {},
  60. 'media_games': {},
  61. 'container_games': {},
  62. 'archive': {},
  63. 'trans': {name: 'Translation/Release Group (optional)'},
  64. 'tags': {notes: 'Tags you should consider, if appropriate: <strong>visual.novel</strong>, <strong>nukige</strong>'},
  65. 'screenshots': {name: 'Screenshots', notes: '<strong class="important_text">Promotional materials from a game\'s store page are NOT screenshots</strong>'},
  66. 'group_desc': {notes: 'Contains information such as a description of the game, its mechanics, etc.'},
  67. 'release_desc': {notes: 'Contains information such as <strong>version</strong>, install instructions, patching instructions, etc.'}
  68. }, {
  69. 'idols': {name: 'Voices (Optional)'},
  70. 'studio': {name: 'Publisher (Optional)'},
  71. 'mediainfo': {},
  72. 'audio': {},
  73. 'year': false,
  74. 'lang': false,
  75. 'dlsite': {},
  76. 'screenshots': {name: 'Samples'},
  77. 'group_desc': {notes: 'Contains information such as a description of the audio work.'},
  78. 'release_desc': {notes: 'Contains information specific to the release.'}
  79. }, {
  80. 'idols': {name: 'Creators/Authors (Optional)'},
  81. 'studio': {name: 'Publisher (Optional)'},
  82. 'year': false,
  83. 'lang': false,
  84. 'dlsite': {},
  85. 'screenshots': {name: 'Screenshots'},
  86. 'release_desc': false
  87. }]
  88. let active = {}
  89. for (let field of def) active[field] = {}
  90. let category = 0
  91. if ($('input[name="type"]').raw()) category = $('input[name="type"]').raw().value
  92. if ($('#categories').raw()) category = $('#categories').raw().value
  93. active = Object.assign(active, cats[category])
  94. let hide = el => {
  95. Array.from($(`#${el.id} input, #${el.id} select, #${el.id} textarea`)).forEach(inp => inp.disabled = true)
  96. $(el).ghide()
  97. }
  98. let show = el => {
  99. Array.from($(`#${el.id} input, #${el.id} select, #${el.id} textarea`)).forEach(inp => inp.disabled = false)
  100. $(el).gshow()
  101. }
  102. let trs = $('#dynamic_form tr')
  103. for (let tr of trs) {
  104. let field = tr.id.slice(0,-3)
  105. if (active[field]) {
  106. if (active[field].name) {
  107. tr.children[0].innerHTML = active[field].name
  108. }
  109. let notes = $(`#${tr.id} p.notes`).raw()
  110. if (notes) notes.innerHTML = active[field].notes||''
  111. show(tr)
  112. } else {
  113. hide(tr)
  114. }
  115. }
  116. */
  117. }
  118. function Bitrate() {
  119. $('#other_bitrate').raw().value = '';
  120. if ($('#bitrate').raw().options[$('#bitrate').raw().selectedIndex].value == 'Other') {
  121. $('#other_bitrate_span').gshow();
  122. } else {
  123. $('#other_bitrate_span').ghide();
  124. }
  125. }
  126. function AltBitrate() {
  127. if ($('#other_bitrate').raw().value >= 320) {
  128. $('#vbr').raw().disabled = true;
  129. $('#vbr').raw().checked = false;
  130. } else {
  131. $('#vbr').raw().disabled = false;
  132. }
  133. }
  134. function add_tag() {
  135. if ($('#tags').raw().value == "") {
  136. $('#tags').raw().value = $('#genre_tags').raw().options[$('#genre_tags').raw().selectedIndex].value;
  137. } else if ($('#genre_tags').raw().options[$('#genre_tags').raw().selectedIndex].value == '---') {
  138. } else {
  139. $('#tags').raw().value = $('#tags').raw().value + ', ' + $('#genre_tags').raw().options[$('#genre_tags').raw().selectedIndex].value;
  140. }
  141. }
  142. var LogCount = 1;
  143. function AddLogField() {
  144. if (LogCount >= 200) {
  145. return;
  146. }
  147. var LogField = document.createElement("input");
  148. LogField.type = "file";
  149. LogField.id = "file";
  150. LogField.name = "logfiles[]";
  151. LogField.size = 50;
  152. var x = $('#logfields').raw();
  153. x.appendChild(document.createElement("br"));
  154. x.appendChild(LogField);
  155. LogCount++;
  156. }
  157. function RemoveLogField() {
  158. if (LogCount == 1) {
  159. return;
  160. }
  161. var x = $('#logfields').raw();
  162. for (i = 0; i < 2; i++) {
  163. x.removeChild(x.lastChild);
  164. }
  165. LogCount--;
  166. }
  167. var ExtraLogCount = 1;
  168. function AddExtraLogField(id) {
  169. if (LogCount >= 200) {
  170. return;
  171. }
  172. var LogField = document.createElement("input");
  173. LogField.type = "file";
  174. LogField.id = "file_" + id;
  175. LogField.name = "logfiles_" + id + "[]";
  176. LogField.size = 50;
  177. var x = $('#logfields_' + id).raw();
  178. x.appendChild(document.createElement("br"));
  179. x.appendChild(LogField);
  180. LogCount++;
  181. }
  182. function RemoveLogField() {
  183. if (LogCount == 1) {
  184. return;
  185. }
  186. var x = $('#logfields').raw();
  187. for (i = 0; i < 2; i++) {
  188. x.removeChild(x.lastChild);
  189. }
  190. LogCount--;
  191. }
  192. var FormatCount = 0;
  193. function AddFormat() {
  194. if (FormatCount >= 10) {
  195. return;
  196. }
  197. FormatCount++;
  198. $('#extras').raw().value = FormatCount;
  199. var NewRow = document.createElement("tr");
  200. NewRow.id = "new_torrent_row"+FormatCount;
  201. NewRow.setAttribute("style","border-top-width: 5px; border-left-width: 5px; border-right-width: 5px;");
  202. var NewCell1 = document.createElement("td");
  203. NewCell1.setAttribute("class","label");
  204. NewCell1.innerHTML = "Extra Torrent File";
  205. var NewCell2 = document.createElement("td");
  206. var TorrentField = document.createElement("input");
  207. TorrentField.type = "file";
  208. TorrentField.id = "extra_torrent_file"+FormatCount;
  209. TorrentField.name = "extra_torrent_files[]";
  210. TorrentField.size = 50;
  211. NewCell2.appendChild(TorrentField);
  212. NewRow.appendChild(NewCell1);
  213. NewRow.appendChild(NewCell2);
  214. NewRow = document.createElement("tr");
  215. NewRow.id = "new_format_row"+FormatCount;
  216. NewRow.setAttribute("style","border-left-width: 5px; border-right-width: 5px;");
  217. NewCell1 = document.createElement("td");
  218. NewCell1.setAttribute("class","label");
  219. NewCell1.innerHTML = "Extra Format / Bitrate";
  220. NewCell2 = document.createElement("td");
  221. tmp = '<select id="releasetype" name="extra_formats[]"><option value="">---</option>';
  222. var formats=["Saab","Volvo","BMW"];
  223. for (var i in formats) {
  224. tmp += '<option value="'+formats[i]+'">'+formats[i]+"</option>\n";
  225. }
  226. tmp += "</select>";
  227. var bitrates=["1","2","3"];
  228. tmp += '<select id="releasetype" name="extra_bitrates[]"><option value="">---</option>';
  229. for (var i in bitrates) {
  230. tmp += '<option value="'+bitrates[i]+'">'+bitrates[i]+"</option>\n";
  231. }
  232. tmp += "</select>";
  233. NewCell2.innerHTML = tmp;
  234. NewRow.appendChild(NewCell1);
  235. NewRow.appendChild(NewCell2);
  236. NewRow = document.createElement("tr");
  237. NewRow.id = "new_description_row"+FormatCount;
  238. NewRow.setAttribute("style","border-bottom-width: 5px; border-left-width: 5px; border-right-width: 5px;");
  239. NewCell1 = document.createElement("td");
  240. NewCell1.setAttribute("class","label");
  241. NewCell1.innerHTML = "Extra Release Description";
  242. NewCell2 = document.createElement("td");
  243. NewCell2.innerHTML = '<textarea name="extra_release_desc[]" id="release_desc" cols="60" rows="4"></textarea>';
  244. NewRow.appendChild(NewCell1);
  245. NewRow.appendChild(NewCell2);
  246. }
  247. function RemoveFormat() {
  248. if (FormatCount == 0) {
  249. return;
  250. }
  251. $('#extras').raw().value = FormatCount;
  252. var x = $('#new_torrent_row'+FormatCount).raw();
  253. x.parentNode.removeChild(x);
  254. x = $('#new_format_row'+FormatCount).raw();
  255. x.parentNode.removeChild(x);
  256. x = $('#new_description_row'+FormatCount).raw();
  257. x.parentNode.removeChild(x);
  258. FormatCount--;
  259. }
  260. var ArtistCount = 1;
  261. function AddArtistField() {
  262. window.getSelection().removeAllRanges()
  263. ArtistCount = $('input[name="idols[]"]').length;
  264. if (ArtistCount >= 200) {
  265. return;
  266. }
  267. var ArtistField = document.createElement("input");
  268. ArtistField.type = "text";
  269. ArtistField.id = "idols_" + ArtistCount;
  270. ArtistField.name = "idols[]";
  271. ArtistField.size = 45;
  272. var x = $('#idolfields').raw();
  273. x.appendChild(document.createElement("br"));
  274. x.appendChild(ArtistField);
  275. x.appendChild(document.createTextNode('\n'));
  276. if ($("#idol").data("gazelle-autocomplete")) {
  277. $(ArtistField).live('focus', function() {
  278. $(ArtistField).autocomplete({
  279. serviceUrl : 'artist.php?action=autocomplete'
  280. });
  281. });
  282. }
  283. ArtistCount++;
  284. }
  285. function RemoveArtistField() {
  286. window.getSelection().removeAllRanges()
  287. ArtistCount = $('input[name="idols[]"]').length;
  288. if (ArtistCount == 1) {
  289. return;
  290. }
  291. var x = $('#idolfields').raw();
  292. for (i = 0; i < 3; i++) {
  293. x.removeChild(x.lastChild);
  294. }
  295. ArtistCount--;
  296. }
  297. function AddScreenshotField() {
  298. var sss = $('[name="screenshots[]"]')
  299. if (sss.length >= 10) return
  300. var ScreenshotField = document.createElement("input");
  301. ScreenshotField.type = "text";
  302. ScreenshotField.id = "ss_" + sss.length;
  303. ScreenshotField.name = "screenshots[]";
  304. ScreenshotField.size = 45;
  305. var a = document.createElement("a")
  306. a.className = "brackets"
  307. a.innerHTML = "−"
  308. a.onclick = function(){RemoveScreenshotField(this)}
  309. var x = $('#screenshots').raw()
  310. var y = document.createElement("div")
  311. y.appendChild(ScreenshotField);
  312. y.appendChild(document.createTextNode('\n'));
  313. y.appendChild(a);
  314. x.appendChild(y);
  315. }
  316. function RemoveScreenshotField(el) {
  317. var sss = $('[name="screenshots[]"]')
  318. el.parentElement.remove()
  319. }
  320. function CheckVA () {
  321. if ($('#artist').raw().value.toLowerCase().trim().match(/^(va|various(\sa|a)rtis(t|ts)|various)$/)) {
  322. $('#vawarning').gshow();
  323. } else {
  324. $('#vawarning').ghide();
  325. }
  326. }
  327. function CheckYear() {
  328. var media = $('#media').raw().options[$('#media').raw().selectedIndex].text;
  329. if (media == "---" || media == "Vinyl" || media == "Soundboard" || media == "Cassette") {
  330. media = "old";
  331. }
  332. var year = $('#year').val();
  333. var unknown = $('#unknown').prop('checked');
  334. if (year < 1982 && year != '' && media != "old" && !unknown) {
  335. $('#yearwarning').gshow();
  336. $('#remaster').raw().checked = true;
  337. $('#remaster_true').gshow();
  338. } else if (unknown) {
  339. $('#remaster').raw().checked = true;
  340. $('#yearwarning').ghide();
  341. $('#remaster_true').gshow();
  342. } else {
  343. $('#yearwarning').ghide();
  344. }
  345. }
  346. function ToggleUnknown() {
  347. if ($('#unknown').raw().checked) {
  348. $('#remaster_year').raw().value = "";
  349. $('#remaster_title').raw().value = "";
  350. $('#remaster_record_label').raw().value = "";
  351. $('#remaster_catalogue_number').raw().value = "";
  352. if ($('#groupremasters').raw()) {
  353. $('#groupremasters').raw().selectedIndex = 0;
  354. $('#groupremasters').raw().disabled = true;
  355. }
  356. $('#remaster_year').raw().disabled = true;
  357. $('#remaster_title').raw().disabled = true;
  358. $('#remaster_record_label').raw().disabled = true;
  359. $('#remaster_catalogue_number').raw().disabled = true;
  360. } else {
  361. $('#remaster_year').raw().disabled = false;
  362. $('#remaster_title').raw().disabled = false;
  363. $('#remaster_record_label').raw().disabled = false;
  364. $('#remaster_catalogue_number').raw().disabled = false;
  365. if ($('#groupremasters').raw()) {
  366. $('#groupremasters').raw().disabled = false;
  367. }
  368. }
  369. }
  370. function AnimeAutofill() {
  371. var map = { artist: 'idols_0',
  372. title: 'title',
  373. title_rj: 'title_rj',
  374. title_jp: 'title_jp',
  375. year: 'year',
  376. description: 'album_desc' }
  377. var aid = $('#anidb').raw().value
  378. $.getJSON('/ajax.php?action=autofill&cat=anime&aid='+aid, function(data) {
  379. if (data.status != "success") return
  380. for (i in data.response) {
  381. if (map[i] && !($('#'+map[i]).raw().value)) {
  382. $('#'+map[i]).raw().value = data.response[i]
  383. }
  384. }
  385. })
  386. }
  387. function JavAutofill() {
  388. var map = { cn: 'javdb',
  389. idols: 'idols',
  390. title: 'title',
  391. title_jp: 'title_jp',
  392. year: 'year',
  393. studio: 'studio',
  394. image: 'image',
  395. tags: 'tags',
  396. description: 'album_desc' }
  397. var cn = $('#javdb_tr #catalogue').raw().value.toUpperCase()
  398. $.getJSON('/ajax.php?action=autofill&cat=jav&cn='+cn, function(data) {
  399. if (data.status != "success") {
  400. $('#catalogue').raw().value = 'Failed'
  401. return
  402. } else {
  403. $('#catalogue').raw().value = data.response.cn
  404. }
  405. for (i in data.response) {
  406. if (Array.isArray(data.response[i])) {
  407. for (j in data.response[i]) {
  408. if (i == 'idols') {
  409. if (!($('#'+map[i]+'_'+j).raw())) {
  410. AddArtistField()
  411. }
  412. $('#'+map[i]+'_'+j).raw().value = data.response[i][j]
  413. }
  414. if (map[i] == 'tags' && !($('#'+map[i]).raw().value)) {
  415. $('#'+map[i]).raw().value = data.response[i].join(', ')
  416. }
  417. }
  418. }
  419. if (map[i] && $('#'+map[i]).raw() && !($('#'+map[i]).raw().value)) {
  420. $('#'+map[i]).raw().value = data.response[i]
  421. }
  422. }
  423. if (data.response.screens.length) {
  424. $('#album_desc').raw().value = ('[spoiler=Automatically located thumbs][img]'+data.response.screens.join('[/img][img]')+'[/img][/spoiler]\n\n') + $('#album_desc').raw().value
  425. }
  426. })
  427. }
  428. function MangaAutofill() {
  429. var map = { artists: 'idols',
  430. title: 'title',
  431. title_jp: 'title_jp',
  432. year: 'year',
  433. tags: 'tags',
  434. lang: 'lang',
  435. cover: 'image',
  436. circle: 'series',
  437. pages: 'pages',
  438. description: 'release_desc' }
  439. var nh = $('#ehentai_tr #catalogue').raw().value
  440. $.getJSON('/ajax.php?action=autofill&cat=manga&url='+nh, function(data) {
  441. if (data.status != "success") {
  442. $('#catalogue').raw().value = 'Failed'
  443. return
  444. }
  445. for (i in data.response) {
  446. if (Array.isArray(data.response[i])) {
  447. for (j in data.response[i]) {
  448. if (i == 'artists') {
  449. if (!($('#'+map[i]+'_'+j).raw())) {
  450. AddArtistField()
  451. }
  452. $('#'+map[i]+'_'+j).raw().value = data.response[i][j]
  453. }
  454. if (map[i] == 'tags' && !($('#'+map[i]).raw().value)) {
  455. $('#'+map[i]).raw().value = data.response[i].join(', ')
  456. }
  457. }
  458. }
  459. if (map[i] && $('#'+map[i]).raw() && (!($('#'+map[i]).raw().value) || $('#'+map[i]).raw().value == '---')) {
  460. $('#'+map[i]).raw().value = data.response[i]
  461. }
  462. }
  463. })
  464. }
  465. function SetResolution() {
  466. if ($('#ressel').raw().value != 'Other') {
  467. $('#resolution').raw().value = $('#ressel').raw().value
  468. $('#resolution').ghide()
  469. } else {
  470. $('#resolution').raw().value = ''
  471. $('#resolution').gshow()
  472. $('#resolution').raw().readOnly = false
  473. }
  474. }
  475. function MediaInfoExtract() {
  476. const mi = $('#mediainfo').raw().value
  477. function getval(mi, key) {
  478. var match = mi.match(new RegExp('^'+key+'\\s*:\\s*(.*)', 'mi'))
  479. return (match && match[1]) ? match[1] : false
  480. }
  481. ['container', 'codec', 'resolution', 'audioformat', 'lang'].forEach((sel) => {
  482. if (sel == 'resolution') {
  483. var width = getval(mi, 'Width')
  484. var height = getval(mi, 'Height')
  485. if (!(width && height)) { return }
  486. width = width.match(/[0-9 ]+/)[0].replace(/ /g, '')
  487. height = height.match(/[0-9 ]+/)[0].replace(/ /g, '')
  488. var ressel = $('[name=ressel]').raw()
  489. if (width == '680' && height == '480') { ressel.value = 'SD' }
  490. else if (height == '480') { ressel.value = '480p' }
  491. else if (height == '720') { ressel.value = '720p' }
  492. else if (height == '1080' && getval(mi, 'Scan type' == 'Interlaced')) { ressel.value = '1080i' }
  493. else if (height == '1080') { ressel.value = '1080p' }
  494. else if (width == '3840') { ressel.value = '4K' }
  495. else {
  496. ressel.value = 'Other'
  497. $('[name=resolution]').raw().value = width+'x'+height
  498. }
  499. } else if (sel == 'lang') {
  500. var val1 = getval(mi.slice(mi.search(/^Audio$/m)), 'Language')
  501. var val2 = getval(mi.slice(mi.search(/^Audio\nID.*[^1]/m)), 'Language')
  502. var val = (val2 && val2 != val1 && (val1+val2 == 'EnglishJapanese' || val1+val2 == 'JapaneseEnglish')) ? 'Dual Language' : val1
  503. if (val) { $('[name=lang]').raw().value = val }
  504. } else if (sel == 'container') {
  505. var containerTable = {'Matroska': 'MKV','MPEG-4': 'MP4','AVI': 'AVI','OGG': 'OGM','Windows Media': 'WMV'}
  506. var cont = getval(mi, 'Format')
  507. if (containerTable[cont]) { $('[name=container]').raw().value = containerTable[cont] }
  508. } else if (sel == 'codec') {
  509. var codecTable = {'WMV1':'WMV','VC-1':'WMV','HEVC':'HEVC'}
  510. var codec = getval(mi.slice(mi.search(/^Video$/m)), 'Format')
  511. var formatProfile = getval(mi.slice(mi.search(/^Video$/m)), 'Format profile')
  512. var codecID = getval(mi, 'Codec ID')
  513. var codel = $('[name=codec]').raw()
  514. if (codec == 'AVC') {
  515. codel.value = (formatProfile.includes('High 10')) ? '10-bit h264' : 'h264'
  516. }
  517. else if (codec == 'MPEG-4 Visual') {
  518. codel.value = (codecID == 'XVID') ? 'XVID' : 'DIVX'
  519. }
  520. else if (codecTable[codec]) {
  521. codel.value = codecTable[codec]
  522. }
  523. }
  524. })
  525. }
  526. function initAutofill() {
  527. $('[autofill]').each(function(i, el) {
  528. el.addEventListener('click', function(event) {
  529. ({'douj':MangaAutofill, 'anime':AnimeAutofill, 'jav':JavAutofill})[el.attributes['autofill'].value]()
  530. })
  531. })
  532. }
  533. $(function() {
  534. Categories();
  535. initAutofill();
  536. $(document).on('click', '.add_artist_button', AddArtistField);
  537. $(document).on('click', '.remove_artist_button', RemoveArtistField);
  538. })