Template:Akalin

本插件用来引入控制样式的选项按钮，仅用于阿卡林模板

作者：AnnAngela, XYZ指示物 (Nbdd0121)

协议：CC BY-NC-SA 3.0

 .apertureOfEvilEye { display: inline; padding: 0 1em; border-width: 1px 0 1px 1px; border-color: #a7d7f9; border-style: solid; cursor: pointer; } .apertureOfEvilEye:last-child { border-right-width: 1px; }  window.RLQ = window.RLQ || []; window.RLQ.push(function {   window.widgetAkalin = function(element, defaultOpacity) {        if (defaultOpacity > 1) defaultOpacity = 1;        else if (defaultOpacity < 0) defaultOpacity = 0;

var opacities = [0, 0.25, 0.5, 0.75, 1]; if (opacities.indexOf(defaultOpacity) === -1) { opacities.push(defaultOpacity); opacities.sort; }

for (var i = 0; i < opacities.length; i++) element.append('' + Math.round(opacities[i] * 100) + '%<' + '/div>');

element.show; var allElements = element.parents('.infoBox').parent.children; var elements = allElements.not('#toc,.infoBox,.infotemplatebox').add(allElements.filter('h2').nextAll); var others = allElements.filter('#toc,.infoBox,.infotemplatebox'); elements.css('transition', 'opacity 233ms'); others.css('position', 'relative').css('z-index', '1'); var button = element.find('.apertureOfEvilEye'), currentOpacity = element.find('#currentAkalinOpacity'); button.bind('click', function {           elements.css('opacity', this.title);            currentOpacity.text($(this).text);        }); elements.css('opacity', defaultOpacity); currentOpacity.text(Math.round(defaultOpacity * 100) + '%'); }; }); ）： window.RLQ.push(function{ var script = document.currentScript || document.scripts[document.scripts.length -1]; return function { $(function{           widgetAkalin($(script).parent, );        }); }; });