diff options
Diffstat (limited to 'addons/snailmail/static/src/js')
| -rw-r--r-- | addons/snailmail/static/src/js/snailmail_external_layout.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/snailmail/static/src/js/snailmail_external_layout.js b/addons/snailmail/static/src/js/snailmail_external_layout.js new file mode 100644 index 00000000..be691d26 --- /dev/null +++ b/addons/snailmail/static/src/js/snailmail_external_layout.js @@ -0,0 +1,7 @@ +// Change address font-size if needed +document.addEventListener('DOMContentLoaded', function (evt) { + var recipientAddress = document.getElementsByClassName('address row')[0].getElementsByTagName('address')[0]; + var height = parseFloat(window.getComputedStyle(recipientAddress, null).getPropertyValue('height')); + var fontSize = parseFloat(window.getComputedStyle(recipientAddress, null).getPropertyValue('font-size')); + recipientAddress.style.fontSize = (85/height) * fontSize + 'px'; +}); |
