⚡ 🔥 Refactor struct & code for loading 3rd scripts.
This commit is contained in:
9
assets/js/third-party/others/translate.js
vendored
Normal file
9
assets/js/third-party/others/translate.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/* Google translate plugin */
|
||||
NexT.plugins.others.translate = function() {
|
||||
const element = '#gtranslate';
|
||||
if (!NexT.utils.checkDOMExist(element)) return;
|
||||
NexT.utils.lazyLoadComponent(element, function() {
|
||||
window.translateelement_styles='/css/google-translate.min.css';
|
||||
NexT.utils.getScript('/js/third-party/google-translate.min.js');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user