⚡ 🔥 Refactor struct & code for loading 3rd scripts.
This commit is contained in:
16
assets/js/third-party/others/lawidget.js
vendored
Normal file
16
assets/js/third-party/others/lawidget.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/* 51La sidebar data widget */
|
||||
NexT.plugins.others.lawidget = function() {
|
||||
const element = '#siteinfo-card-widget';
|
||||
const lawt_js = NexT.CONFIG.lawidget.js.replace('laId', NexT.CONFIG.lawidget.id);
|
||||
|
||||
NexT.utils.lazyLoadComponent(element, function () {
|
||||
NexT.utils.getScript(lawt_js,{
|
||||
attributes: {
|
||||
id: 'LA-DATA-WIDGET',
|
||||
crossorigin: 'anonymous',
|
||||
charset: 'UTF-8',
|
||||
defer: true
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user