From aff5a33ab0d70fdb3eb17333df3eabb2e5d1b36f Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 09:00:26 +0200 Subject: [PATCH 1/8] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 6df2703e..dc6359cc 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -29,7 +29,7 @@ -
+
@@ -105,7 +105,7 @@
{{end}} {{ block footer_js()}} - From 438f84f090637dc8b23447967dcae8ea0f007fd6 Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 11:53:46 +0200 Subject: [PATCH 4/8] make use of above change to have the right category by default if the form isn't empty --- templates/site/torrents/upload.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 0ecd8df0..67898aaa 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -129,6 +129,7 @@ document.getElementsByClassName["form-language-checkbox"][lang_index].addEventListener("change", UpdateTorrentLang); UpdateTorrentLang(); + UpdateCategory(); From d45ddbd3d1aa258fee9f70d011cc0cb2e52309dd Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 12:02:06 +0200 Subject: [PATCH 5/8] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 67898aaa..60333ef7 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -129,7 +129,7 @@ document.getElementsByClassName["form-language-checkbox"][lang_index].addEventListener("change", UpdateTorrentLang); UpdateTorrentLang(); - UpdateCategory(); + UpdatePreviewCategory(); From 6e6adb538d2c77d94f73640d9830028354b4486a Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 12:02:08 +0200 Subject: [PATCH 6/8] Update kilo.js --- public/js/kilo.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/js/kilo.js b/public/js/kilo.js index bfbd9800..14539d68 100644 --- a/public/js/kilo.js +++ b/public/js/kilo.js @@ -2,9 +2,10 @@ document.getElementsByClassName("form-torrent-name")[0].onkeyup = function(){ document.getElementsByClassName("table-torrent-name")[0].innerText = document.getElementsByClassName("form-torrent-name")[0].value; }; -document.getElementsByClassName("form-torrent-category")[0].onchange = function(){ +function UpdatePreviewCategory(){ document.getElementsByClassName("table-torrent-category")[0].className = "nyaa-cat table-torrent-category "+ Sukebei ? "sukebei" : "nyaa" + "-cat-" + Categorylist[Sukebei][document.getElementsByClassName("form-torrent-category")[0].selectedIndex]; -}; +} +document.getElementsByClassName("form-torrent-category")[0].addEventListener("change", UpdatePreviewCategory); document.getElementsByClassName("form-torrent-remake")[0].onchange = function(){ document.getElementsByClassName("table-torrent-thead")[0].className = "torrent-info table-torrent-thead" + (UserTrusted ? " trusted : "") + (document.getElementsByClassName("form-torrent-remake")[0].checked ? " remake" : ""); @@ -14,8 +15,8 @@ document.getElementsByClassName("form-torrent-hidden")[0].onchange = function(){ document.getElementsByClassName("table-torrent-thead")[0].className = "torrent-info table-torrent-thead" + (document.getElementsByClassName("form-torrent-remake")[0].checked ? " remake" : ""); if(UserTrusted && !document.getElementsByClassName("form-torrent-hidden")[0].checked) document.getElementsByClassName("table-torrent-thead")[0].className = document.getElementsByClassName("table-torrent-thead")[0].className + " trusted"; -}; - +}; ' + var CategoryList = [ [5 12, From d43adf7624d44ce062fa2b7c3dc154c54cc6493a Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 14:11:05 +0200 Subject: [PATCH 7/8] Update kilo.js --- public/js/kilo.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/js/kilo.js b/public/js/kilo.js index 14539d68..a2ecf4b8 100644 --- a/public/js/kilo.js +++ b/public/js/kilo.js @@ -5,7 +5,6 @@ document.getElementsByClassName("form-torrent-name")[0].onkeyup = function(){ function UpdatePreviewCategory(){ document.getElementsByClassName("table-torrent-category")[0].className = "nyaa-cat table-torrent-category "+ Sukebei ? "sukebei" : "nyaa" + "-cat-" + Categorylist[Sukebei][document.getElementsByClassName("form-torrent-category")[0].selectedIndex]; } -document.getElementsByClassName("form-torrent-category")[0].addEventListener("change", UpdatePreviewCategory); document.getElementsByClassName("form-torrent-remake")[0].onchange = function(){ document.getElementsByClassName("table-torrent-thead")[0].className = "torrent-info table-torrent-thead" + (UserTrusted ? " trusted : "") + (document.getElementsByClassName("form-torrent-remake")[0].checked ? " remake" : ""); From b2932e41b2c23e1a8b13b69b51f334ae2040b27e Mon Sep 17 00:00:00 2001 From: kilo Date: Sat, 15 Jul 2017 14:11:22 +0200 Subject: [PATCH 8/8] Update upload.jet.html --- templates/site/torrents/upload.jet.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 60333ef7..1c15fb31 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -108,6 +108,7 @@