/*! XRK Footer — Solid Black Backdrop Add-on (drop-in)
* Purpose: Make ONLY the footer area background solid black, regardless of site theme.
* How to use:
* 1) Load this AFTER xrk-footer.*.js
*
*
* 2) Optional: set window.XRKF_BACKDROP = { opacity: 1, blur: 0 } before this script to tweak.
*/
(function(){
'use strict';
var STYLE_ID = 'xrkf-style-solid';
var ROOT_ID = 'xrkf-root';
var OPT = (window.XRKF_BACKDROP||{});
var opacity = (typeof OPT.opacity==='number'? OPT.opacity : 1); // 0-1
var blur = (typeof OPT.blur==='number'? OPT.blur : 0); // px
function ensureStyle(){
if (document.getElementById(STYLE_ID)) return;
var s = document.createElement('style'); s.id = STYLE_ID;
// We use a pseudo-element so only the footer block is affected.
// The rest of the page remains unchanged.
s.textContent = [
'#'+ROOT_ID+' .xrkf-footer{ position:relative; }',
'#'+ROOT_ID+' .xrkf-footer::before{',
' content:""; position:absolute; inset:0; z-index:-1;',
' background:#000; opacity:OP;',
' -webkit-backdrop-filter: blur(BP); backdrop-filter: blur(BP);',
'}'
].join('\n').replaceAll('OP', String(opacity)).replaceAll('BP', String(blur)+'px');
document.head.appendChild(s);
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', ensureStyle, { once:true });
else ensureStyle();
})();