# qi-blocks/1.1.1/assets/dist/button-script.js

Qi Blocks, version 1.1.1. 1 lines.

- Page: https://pluginprobe.com/plugins/qi-blocks/1.1.1/code/assets/dist/button-script.js
- Raw: https://pluginprobe.com/plugins/qi-blocks/1.1.1/raw/assets/dist/button-script.js
- Modified: 2023-04-28T10:17:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/qi-blocks/1.1.1/code/assets/dist/button-script.js#L10-L20`.

```javascript
(()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){t.init()}));const t={init:function(){this.holder=document.querySelectorAll(".qi-block-button"),this.holder.length&&[...this.holder].map((e=>{t.initItem(e)}))},getRealCurrentItem:function(t){return"string"==typeof t&&""!==t&&(t=qiBlocksEditor.qodefGetCurrentBlockElement.get(t)),t},initItem:function(e){if(!(e=t.getRealCurrentItem(e)))return;const n=e.querySelector(".qodef-m-icon");if(n){let t="auto";e.classList.contains("qodef-type--icon-boxed")&&(t=parseInt(window.getComputedStyle(e).getPropertyValue("height"),10)+"px"),n.style.width=t}}}})();
```
