summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-03-30 14:25:34 +0200
committerYorhel <git@yorhel.nl>2011-03-30 14:25:34 +0200
commit7c8306f215050243029cfc2dc22152a02476a285 (patch)
tree7792d9c3d05ff05573e7ee9fe70a08f674e03b03 /data
parenta2a389e70da0ec880d9e028f5041060416e7b7d8 (diff)
chardb: Rushed in some crappy spoiler hiding stuff
Diffstat (limited to 'data')
-rw-r--r--data/script.js24
-rw-r--r--data/style.css6
2 files changed, 29 insertions, 1 deletions
diff --git a/data/script.js b/data/script.js
index cdb02447..aa7b91a0 100644
--- a/data/script.js
+++ b/data/script.js
@@ -2738,6 +2738,30 @@ if(byId('expandall')) {
}
+// charspoil handling (ugly)
+if(byId('charspoil_sel')) {
+ var k = byClass('charspoil');
+ var h = byName(byId('charspoil_sel'), 'a');
+ var setall = function(spoil) {
+ for(var i=0; i<k.length; i++)
+ setClass(k[i], 'hidden',
+ hasClass(k[i], 'charspoil_0') ? false :
+ hasClass(k[i], 'charspoil_1') ? spoil < 1 : spoil < 2);
+ for(var i=0; i<h.length; i++)
+ setClass(h[i], 'sel', spoil == i);
+ };
+ for(var i=0; i<h.length; i++) {
+ h[i].num = i;
+ h[i].onclick = function() {
+ setall(this.num);
+ setCookie('tagspoil', this.num);
+ return false;
+ };
+ };
+ setall(getCookie('tagspoil'));
+}
+
+
// set note input box (/u+/list)
if(byId('not') && byId('vns'))
byId('vns').onchange = function () {
diff --git a/data/style.css b/data/style.css
index 0bc9973d..08199de0 100644
--- a/data/style.css
+++ b/data/style.css
@@ -854,7 +854,7 @@ div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px
-/***** Char page *****/
+/***** Char page (also used on VN page) *****/
div.chardetails { margin: 0 auto; width: 800px; }
div.charimg { float: left; width: 250px; margin: 0 10px; text-align: center }
@@ -864,6 +864,10 @@ div.charimg p { text-align: center; padding: 0px; margin: 0; }
div.chardetails table { float: left; width: 530px; }
div.chardetails table td.key { width: 80px; }
div.chardetails.charsep { padding-top: 5px; margin-top: 5px; border-top: 1px solid $border$ }
+#charspoil_sel { clear: right; float: right; }
+#charspoil_sel a { margin: 0 0 0 10px; border: 0; outline: none }
+#maincontent #charspoil_sel a.sel { color: $maintext$; }
+
/***** Char edit *****/