From 0dcb9e3c5de6043560bb9f53e99022eb6d99d3ec Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 23:24:12 +0200 Subject: [PATCH] change value to .checked --- public/js/kilo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/kilo.js b/public/js/kilo.js index e5490d7b..4c6ad9cb 100644 --- a/public/js/kilo.js +++ b/public/js/kilo.js @@ -7,12 +7,12 @@ document.getElementsByClassName("form-torrent-category")[0].onchange = function( }; 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].value == "on" ? " remake" : ""); + document.getElementsByClassName("table-torrent-thead")[0].className = "torrent-info table-torrent-thead" + (UserTrusted ? " trusted : "") + (document.getElementsByClassName("form-torrent-remake")[0].checked ? " remake" : ""); }; 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].value == "on" ? " remake" : ""); - if(UserTrusted && document.getElementsByClassName("form-torrent-hidden")[0].value == "off") + 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"; };