From 56bcf928863da265a638c3c81ba86eaff4374ef4 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 3 May 2013 11:49:25 -0700 Subject: [PATCH] Fix z-index conflict. --- builds/appchan-x.js | 6 +++--- builds/appchan-x.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/General/Config.coffee | 2 +- src/General/css/layout.css | 2 +- src/Theming/Mascots.coffee | 3 +++ 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/builds/appchan-x.js b/builds/appchan-x.js index b9639dc5f..be78616cf 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -282,7 +282,7 @@ Mascots: { 'Mascots': [true, 'Add a pretty picture of your waifu to Appchan.'], 'Mascot Location': ['sidebar', 'Change where your mascot is located.', ['sidebar', 'opposite']], - 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom']], + 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom', 'middle']], 'Mascots Overlap Posts': [true, 'Mascots overlap threads and posts.'], 'NSFW/SFW Mascots': [false, 'Enable or disable mascots based on the SFW status of the board you are viewing.'], 'Grayscale Mascots': [false, 'Force mascots to be monochrome.'], @@ -10481,7 +10481,7 @@ if (Conf["Grayscale Mascots"]) { filters.push(''); } - return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n}"; + return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : Conf['Mascot Position'] === 'middle' ? '50%' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n " + (Conf['Mascot Position'] === 'middle' ? "" + Style.agent + "transform: translateY(50%);" : '') + "\n}"; }, categories: ['Anime', 'Ponies', 'Questionable', 'Silhouette', 'Western'], dialog: function(key) { @@ -11099,7 +11099,7 @@ "under post form": " position: fixed; " + Style.sidebarLocation[0] + ": 2px; bottom: 140px; width: " + width + "px;", "at top": " margin: 12px 0;", "hide": " display: none;" - }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 22;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { + }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 21;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { compact: "#boardNavDesktopFoot { word-spacing: 1px;}", list: "#boardNavDesktopFoot a { display: block;}#boardNavDesktopFoot:hover { max-height: 400px;}#boardNavDesktopFoot a::after { content: ' - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::after,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::after { content: '/ - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::before,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::before { content: '/';}", hide: "#boardNavDesktopFoot { display: none;}" diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index c1a54b224..54855fd1e 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -283,7 +283,7 @@ Mascots: { 'Mascots': [true, 'Add a pretty picture of your waifu to Appchan.'], 'Mascot Location': ['sidebar', 'Change where your mascot is located.', ['sidebar', 'opposite']], - 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom']], + 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom', 'middle']], 'Mascots Overlap Posts': [true, 'Mascots overlap threads and posts.'], 'NSFW/SFW Mascots': [false, 'Enable or disable mascots based on the SFW status of the board you are viewing.'], 'Grayscale Mascots': [false, 'Force mascots to be monochrome.'], @@ -10502,7 +10502,7 @@ if (Conf["Grayscale Mascots"]) { filters.push(''); } - return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n}"; + return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : Conf['Mascot Position'] === 'middle' ? '50%' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n " + (Conf['Mascot Position'] === 'middle' ? "" + Style.agent + "transform: translateY(50%);" : '') + "\n}"; }, categories: ['Anime', 'Ponies', 'Questionable', 'Silhouette', 'Western'], dialog: function(key) { @@ -11120,7 +11120,7 @@ "under post form": " position: fixed; " + Style.sidebarLocation[0] + ": 2px; bottom: 140px; width: " + width + "px;", "at top": " margin: 12px 0;", "hide": " display: none;" - }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 22;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { + }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 21;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { compact: "#boardNavDesktopFoot { word-spacing: 1px;}", list: "#boardNavDesktopFoot a { display: block;}#boardNavDesktopFoot:hover { max-height: 400px;}#boardNavDesktopFoot a::after { content: ' - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::after,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::after { content: '/ - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::before,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::before { content: '/';}", hide: "#boardNavDesktopFoot { display: none;}" diff --git a/builds/crx/script.js b/builds/crx/script.js index bcb104e0d..883e31a45 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -263,7 +263,7 @@ Mascots: { 'Mascots': [true, 'Add a pretty picture of your waifu to Appchan.'], 'Mascot Location': ['sidebar', 'Change where your mascot is located.', ['sidebar', 'opposite']], - 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom']], + 'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom', 'middle']], 'Mascots Overlap Posts': [true, 'Mascots overlap threads and posts.'], 'NSFW/SFW Mascots': [false, 'Enable or disable mascots based on the SFW status of the board you are viewing.'], 'Grayscale Mascots': [false, 'Force mascots to be monochrome.'], @@ -10484,7 +10484,7 @@ if (Conf["Grayscale Mascots"]) { filters.push(''); } - return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n}"; + return Style.mascot.textContent = "#mascot img {\n position: fixed;\n z-index: " + (Conf['Mascots Overlap Posts'] ? '3' : '-1') + ";\n " + (Style.sidebarLocation[0] === "left" ? "" + Style.agent + "transform: scaleX(-1);" : "") + "\n bottom: " + (mascot.position === 'top' ? 'auto' : Conf['Mascot Position'] === 'middle' ? '50%' : (mascot.position === 'bottom' && Conf['Mascot Position'] === 'default') || !$.id('postForm') ? '0' : position) + ";\n " + location + ": " + ((mascot.hOffset || 0) + (Conf['Sidebar'] === 'large' && mascot.center ? 25 : 0)) + "px;\n top: " + (mascot.position === 'top' ? '0' : 'auto') + ";\n height: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\n width: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n margin-" + location + ": " + (mascot.hOffset || 0) + "px;\n margin-bottom: " + (mascot.vOffset || 0) + "px;\n opacity: " + Conf['Mascot Opacity'] + ";\n pointer-events: none;\n " + (filters.length > 0 ? "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" : "") + "\n " + (Conf['Mascot Position'] === 'middle' ? "" + Style.agent + "transform: translateY(50%);" : '') + "\n}"; }, categories: ['Anime', 'Ponies', 'Questionable', 'Silhouette', 'Western'], dialog: function(key) { @@ -11102,7 +11102,7 @@ "under post form": " position: fixed; " + Style.sidebarLocation[0] + ": 2px; bottom: 140px; width: " + width + "px;", "at top": " margin: 12px 0;", "hide": " display: none;" - }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 22;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { + }[_conf["Board Title"]] + "\n}\n.boardTitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) + 10) + "px;\n}\n.boardSubtitle,\n.boardSubtitle a {\n font-size: " + (parseInt(_conf["Font Size"], 10) - 1) + "px;\n}\n/* Dialogs */\n.move {\n cursor: pointer;\n}\n#ihover {\n position: fixed;\n max-height: 97%;\n max-width: 75%;\n padding: 10px;\n z-index: 22;\n}\n#qp {\n position: fixed;\n z-index: 22;\n}\n#qp .postMessage::after {\n clear: both;\n display: block;\n content: \"\";\n}\n#qp .full-image {\n max-height: 300px;\n max-width: 500px;\n}\n#menu {\n position: fixed;\n outline: none;\n z-index: 22;\n}\n/* Image Expansion */\n.fit-width .full-image {\n max-width: 100%;\n width: 100%;\n}\n" + (_conf['Images Overlap Post Form'] ? ".full-image { position: relative; z-index: 21;}" : "") + "\n/* Delete Buttons */\n" + (_conf['Hide Delete UI'] ? ".deleteform,.post:not(#exlinks-options) .rice { display: none;}.postInfo { padding: 0 0 0 3px;}" : ".deleteform { position: fixed; z-index: 18; width: 0; bottom: 0; right: 0; border-width: 1px 0 0 1px; border-style: solid; font-size: 0; color: transparent;}.deleteform:hover { width: auto;}.deleteform::before { z-index: 18; border-width: 1px 0 0 1px; border-style: solid; content: 'X'; display: block; position: fixed; bottom: 0; right: 0; font-size: " + _conf['Font Size'] + "px; " + Style.sizing + ": border-box; height: 1.6em; width: 1.4em; text-align: center;}.deleteform:hover::before { display: none;}.deleteform input { margin: 0 1px 0 0;}") + "\n/* Slideout Navigation */\n#boardNavDesktopFoot {\n position: fixed;\n width: " + width + "px;\n " + Style.sidebarLocation[0] + ": 2px;\n text-align: center;\n font-size: 0;\n color: transparent;\n overflow: hidden;\n " + Style.sizing + ": border-box;\n}\n#boardNavDesktopFoot a,\n#boardNavDesktopFoot a::after,\n#boardNavDesktopFoot a::before {\n font-size: " + _conf['Font Size'] + "px;\n}\n#boardNavDesktopFoot:hover {\n overflow-y: auto;\n padding: 2px;\n}\n#boardNavDesktopFoot:not(:hover) {\n border-color: transparent;\n background-color: transparent;\n height: 0;\n overflow: hidden;\n padding: 0;\n border: 0 none;\n}\n" + { compact: "#boardNavDesktopFoot { word-spacing: 1px;}", list: "#boardNavDesktopFoot a { display: block;}#boardNavDesktopFoot:hover { max-height: 400px;}#boardNavDesktopFoot a::after { content: ' - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::after,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::after { content: '/ - ' attr(title);}#boardNavDesktopFoot a[href*='//boards.4chan.org/']::before,#boardNavDesktopFoot a[href*='//rs.4chan.org/']::before { content: '/';}", hide: "#boardNavDesktopFoot { display: none;}" diff --git a/src/General/Config.coffee b/src/General/Config.coffee index db8c416fb..602f35b4d 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -604,7 +604,7 @@ Config = 'Mascot Position': [ 'default' 'Change where your mascot is placed in relation to the post form.' - ['above post form', 'default', 'bottom'] + ['above post form', 'default', 'bottom', 'middle'] ] 'Mascots Overlap Posts': [ true diff --git a/src/General/css/layout.css b/src/General/css/layout.css index ac6c2c032..58d7714af 100644 --- a/src/General/css/layout.css +++ b/src/General/css/layout.css @@ -523,7 +523,7 @@ else " #{if _conf['Images Overlap Post Form'] then " .full-image { position: relative; - z-index: 22; + z-index: 21; }" else "" } /* Delete Buttons */ diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee index f33c66a78..f2304f8ab 100644 --- a/src/Theming/Mascots.coffee +++ b/src/Theming/Mascots.coffee @@ -56,6 +56,8 @@ MascotTools = bottom: #{ if mascot.position is 'top' 'auto' + else if Conf['Mascot Position'] is 'middle' + '50%' else if (mascot.position is 'bottom' and Conf['Mascot Position'] is 'default') or !$.id 'postForm' '0' else @@ -96,6 +98,7 @@ MascotTools = opacity: #{Conf['Mascot Opacity']}; pointer-events: none; #{if filters.length > 0 then "filter: url('data:image/svg+xml," + filters.join("") + "#filters');" else ""} + #{if Conf['Mascot Position'] is 'middle' then "#{Style.agent}transform: translateY(50%);" else ''} } """