| @@ -9,11 +9,19 @@ | ||
| 9 | 9 | * @param {boolean} is_popup_blocking_screen (optional) when is true then it is impossible to close the popup by clicking outside |
| 10 | 10 | */ |
| 11 | 11 | wp_optimize.block_ui = function (message, options, timeout, is_popup_blocking_screen) { |
| 12 | 12 | |
| 13 | + var font_size = 'medium'; | |
| 14 | + if (typeof message === 'string') { | |
| 15 | + if (message.length < 30) { | |
| 16 | + font_size = 'large'; | |
| 17 | + } else if (message.length > 100) { | |
| 18 | + font_size = 'small'; | |
| 19 | + } | |
| 20 | + } | |
| 21 | + | |
| 13 | 22 | var $ = jQuery, |
| 14 | 23 | logo_src = (typeof wpoptimize !== 'undefined' && wpoptimize.logo_src) || (typeof wposmush !== 'undefined' && wposmush.logo_src), |
| 15 | - font_size = message.length < 30 ? 'large' : ( message.length < 100 ? 'medium' : 'small'), | |
| 16 | 24 | params = { |
| 17 | 25 | css: { |
| 18 | 26 | width: '300px', |
| 19 | 27 | border: 'none', |