|
1 | 1 | /* |
2 | 2 | * Notiflix AIO (https://notiflix.github.io) |
3 | 3 | * Description: This file has been created automatically that using "notiflix.js", and "notiflix.css" files. |
4 | | -* Version: 3.2.7 |
| 4 | +* Version: 3.2.8 |
5 | 5 | * Author: Furkan (https://github.com/furcan) |
6 | | -* Copyright 2019 - 2024 Notiflix, MIT License (https://opensource.org/licenses/MIT) |
| 6 | +* Copyright 2019 - 2025 Notiflix, MIT License (https://opensource.org/licenses/MIT) |
7 | 7 | */ |
8 | 8 |
|
9 | 9 | /* global define */ |
|
304 | 304 | // COMMON: Check Head or Body: begin |
305 | 305 | var commonCheckHeadOrBody = function (element) { |
306 | 306 | if (!element) { element = 'head'; } |
307 | | - if (window.document[element] === null) { |
| 307 | + if (window.document[element] === undefined) { |
308 | 308 | commonConsoleError('\nNotiflix needs to be appended to the "<' + element + '>" element, but you called it before the "<' + element + '>" element has been created.'); |
309 | 309 | return false; |
310 | 310 | } |
|
523 | 523 |
|
524 | 524 | // if plainText is false but the message length more than messageMaxLength => Possible HTML tags error: begin |
525 | 525 | if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { |
526 | | - // extend settings for error massege |
| 526 | + // extend settings for error massage |
527 | 527 | newNotifySettings = commonExtendOptions(true, newNotifySettings, { closeButton: true, messageMaxLength: 150 }); |
528 | 528 | // error message |
529 | 529 | message = 'Possible HTML Tags Error: The "plainText" option is "false" and the notification content length is more than the "messageMaxLength" option.'; |
|
542 | 542 | } |
543 | 543 | // font awesome icon style: end |
544 | 544 |
|
545 | | - // if cssAnimaion is false => duration: begin |
| 545 | + // if cssAnimation is false => duration: begin |
546 | 546 | if (!newNotifySettings.cssAnimation) { |
547 | 547 | newNotifySettings.cssAnimationDuration = 0; |
548 | 548 | } |
549 | | - // if cssAnimaion is false => duration: end |
| 549 | + // if cssAnimation is false => duration: end |
550 | 550 |
|
551 | 551 | // notify wrap: begin |
552 | 552 | var ntflxNotifyWrap = window.document.getElementById(notifySettings.wrapID) || window.document.createElement('div'); |
|
664 | 664 | if (newNotifySettings.closeButton && typeof callbackOrOptions !== 'function') { |
665 | 665 | closeButtonHTML = '<span class="nx-close-button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><g><path fill="' + theType.notiflixIconColor + '" d="M0.38 2.19l7.8 7.81 -7.8 7.81c-0.51,0.5 -0.51,1.31 -0.01,1.81 0.25,0.25 0.57,0.38 0.91,0.38 0.34,0 0.67,-0.14 0.91,-0.38l7.81 -7.81 7.81 7.81c0.24,0.24 0.57,0.38 0.91,0.38 0.34,0 0.66,-0.14 0.9,-0.38 0.51,-0.5 0.51,-1.31 0,-1.81l-7.81 -7.81 7.81 -7.81c0.51,-0.5 0.51,-1.31 0,-1.82 -0.5,-0.5 -1.31,-0.5 -1.81,0l-7.81 7.81 -7.81 -7.81c-0.5,-0.5 -1.31,-0.5 -1.81,0 -0.51,0.51 -0.51,1.32 0,1.82z"/></g></svg></span>'; |
666 | 666 | } |
667 | | - // close buttpon element: end |
| 667 | + // close button element: end |
668 | 668 |
|
669 | 669 | // use icon: begin |
670 | 670 | if (newNotifySettings.useIcon) { |
|
722 | 722 | // hide notify elm and hide overlay: end |
723 | 723 |
|
724 | 724 | // remove notify elm and wrapper: begin |
725 | | - var removeNotifyElmentsAndWrapper = function () { |
| 725 | + var removeNotifyElementsAndWrapper = function () { |
726 | 726 | if (eachNotifyElement && eachNotifyElement.parentNode !== null) { |
727 | 727 | eachNotifyElement.parentNode.removeChild(eachNotifyElement); |
728 | 728 | } |
|
743 | 743 | closeButtonElm.addEventListener('click', function () { |
744 | 744 | hideNotifyElementsAndOverlay(); |
745 | 745 | var clickToCloseTimeout = setTimeout(function () { |
746 | | - removeNotifyElmentsAndWrapper(); |
| 746 | + removeNotifyElementsAndWrapper(); |
747 | 747 | clearTimeout(clickToCloseTimeout); |
748 | 748 | }, newNotifySettings.cssAnimationDuration); |
749 | 749 | }); |
|
758 | 758 | } |
759 | 759 | hideNotifyElementsAndOverlay(); |
760 | 760 | var callbackTimeout = setTimeout(function () { |
761 | | - removeNotifyElmentsAndWrapper(); |
| 761 | + removeNotifyElementsAndWrapper(); |
762 | 762 | clearTimeout(callbackTimeout); |
763 | 763 | }, newNotifySettings.cssAnimationDuration); |
764 | 764 | }); |
|
773 | 773 | hideNotifyElementsAndOverlay(); |
774 | 774 | }, newNotifySettings.timeout); |
775 | 775 | timeoutRemove = setTimeout(function () { |
776 | | - removeNotifyElmentsAndWrapper(); |
| 776 | + removeNotifyElementsAndWrapper(); |
777 | 777 | }, newNotifySettings.timeout + newNotifySettings.cssAnimationDuration); |
778 | 778 | }; |
779 | 779 | autoRemove(); |
|
915 | 915 | } |
916 | 916 | // max length: end |
917 | 917 |
|
918 | | - // if cssAnimaion is false => duration: begin |
| 918 | + // if cssAnimation is false => duration: begin |
919 | 919 | if (!newReportSettings.cssAnimation) { |
920 | 920 | newReportSettings.cssAnimationDuration = 0; |
921 | 921 | } |
922 | | - // if cssAnimaion is false => duration: end |
| 922 | + // if cssAnimation is false => duration: end |
923 | 923 |
|
924 | 924 | // report wrap: begin |
925 | 925 | var ntflxReportWrap = window.document.createElement('div'); |
|
1104 | 1104 | } |
1105 | 1105 | // max length: end |
1106 | 1106 |
|
1107 | | - // if cssAnimaion is false => duration: begin |
| 1107 | + // if cssAnimation is false => duration: begin |
1108 | 1108 | if (!newConfirmSettings.cssAnimation) { |
1109 | 1109 | newConfirmSettings.cssAnimationDuration = 0; |
1110 | 1110 | } |
1111 | | - // if cssAnimaion is false => duration: end |
| 1111 | + // if cssAnimation is false => duration: end |
1112 | 1112 |
|
1113 | 1113 | // confirm wrap: begin |
1114 | 1114 | var ntflxConfirmWrap = window.document.createElement('div'); |
|
1335 | 1335 | } |
1336 | 1336 | // if message settings: end |
1337 | 1337 |
|
1338 | | - // if cssAnimaion is false => duration: begin |
| 1338 | + // if cssAnimation is false => duration: begin |
1339 | 1339 | if (!newLoadingSettings.cssAnimation) { |
1340 | 1340 | newLoadingSettings.cssAnimationDuration = 0; |
1341 | 1341 | } |
1342 | | - // if cssAnimaion is false => duration: end |
| 1342 | + // if cssAnimation is false => duration: end |
1343 | 1343 |
|
1344 | 1344 | // svgIcon: begin |
1345 | 1345 | var svgIcon = ''; |
|
1575 | 1575 | } |
1576 | 1576 | // check the message: end |
1577 | 1577 |
|
1578 | | - // if cssAnimaion is false => duration: begin |
| 1578 | + // if cssAnimation is false => duration: begin |
1579 | 1579 | if (!newBlockSettings.cssAnimation) { |
1580 | 1580 | newBlockSettings.cssAnimationDuration = 0; |
1581 | 1581 | } |
1582 | | - // if cssAnimaion is false => duration: end |
| 1582 | + // if cssAnimation is false => duration: end |
1583 | 1583 |
|
1584 | 1584 | // check the class name: begin |
1585 | 1585 | var blockClassName = blockSettings.className; |
|
0 commit comments