summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzx14 <zx14@vndb.org>2018-11-04 12:44:39 +0700
committerAlexander-- <alexander.r@gmx.com>2018-11-04 14:50:35 +0700
commit64a11153daff20862418f6b8421216aa4ef0a741 (patch)
tree60e690d9379a219b60cc4e271bcdd20a28503301
parent1c8077bfe8c4ad6e8c94ddc94bf505d1396ca3ac (diff)
Remove JS fallback for VN tags
-rw-r--r--data/js/tagops.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/data/js/tagops.js b/data/js/tagops.js
deleted file mode 100644
index 4eebee43..00000000
--- a/data/js/tagops.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var l, lim, spoil = 0, cats = {};
-
-function init() {
- var i;
- l = byName(byId('tagops'), 'input');
-
- // Categories
- for(i=0; i<3; i++) {
- l[i].tagops_cat = l[i].id.substr(l[i].id.indexOf('cat')+4);
- l[i].onchange = function() { cats[this.tagops_cat] = !cats[this.tagops_cat]; return set(); };
- cats[l[i].tagops_cat] = l[i].checked;
- }
-
- // Spoiler level
- for(i=3; i<6; i++) {
- l[i].tagops_spoil = i-3;
- l[i].onchange = function() { spoil = this.tagops_spoil; return set(); };
- if(l[i].checked)
- spoil = i-3;
- }
-
- // Summary / all
- for(i=6; i<8; i++) {
- l[i].tagops_lim = i == 6;
- l[i].onchange = function() { lim = this.tagops_lim; return set(); };
- if(l[i].checked)
- lim = i == 6;
- }
-
- set();
-}
-
-
-function set() {
- var i;
-
- // update tag visibility
- var t = byName(byId('vntags'), 'span');
-
- var n = 0;
- for(i=0; i<t.length; i++) {
- var v = n < (lim ? 15 : 999);
- for(var j=0; j<3; j++)
- if(hasClass(t[i], 'tagspl'+j))
- v = v && j <= spoil;
- for(var c in cats)
- if(hasClass(t[i], 'cat_'+c))
- v = v && cats[c];
- setClass(t[i], 'hidden', !v);
- n += v?1:0;
- }
-
- return false;
-}
-
-
-if(byId('tagops'))
- init();