See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| /* Inline script printed out in the header */ | |
| add_action('wp_head', 'inpost_script_javascript', 9); | |
| function inpost_script_javascript() | |
| { | |
| if (is_checkout()) { | |
| ?> | |
| <script src="https://geowidget.easypack24.net/js/sdk-for-javascript.js"></script> | |
| <style> | |
| .hidden-inpost { | |
| display: none; |
| // fade out | |
| function fade(el) { | |
| var op = 1; | |
| var timer = setInterval(function () { | |
| if (op <= 0.1){ | |
| clearInterval(timer); | |
| el.style.display = 'none'; | |
| } | |
| el.style.opacity = op; |
| function addRemoveClass(element, className, type) { | |
| element.classList[type ? 'add' : 'remove'](className); | |
| } |
| npx typescript sources/index.js --declaration --allowJs --emitDeclarationOnly --outDir types |
| npx browserslist@latest --update-db |
| followActiveElement = (element, container) => { | |
| if (element.offsetTop < container.scrollTop) { | |
| container.scrollTop = element.offsetTop; | |
| } else { | |
| const offsetBottom = element.offsetTop + element.offsetHeight; | |
| const scrollBottom = container.scrollTop + container.offsetHeight; | |
| if (offsetBottom > scrollBottom) { | |
| container.scrollTop = offsetBottom - container.offsetHeight; | |
| } | |
| } |
| // .index() jquery in vanilla js | |
| // jQuery | |
| $('.radio').index(e.currentTarget); | |
| // Native | |
| Array.from(document.querySelectorAll('.radio')).indexOf(e.currentTarget); | |
| or | |
| Array.prototype.indexOf.call(document.querySelectorAll('.radio'), e.currentTarget); |
These instructions shall work on Mac OS X and Linux.
Installation via Homebrew:
brew install mkvtoolnix