2022-10-26 22:37:03 +08:00
|
|
|
/* AddThis share plugin */
|
|
|
|
NexT.plugins.share.addthis = function() {
|
2022-07-13 21:25:15 +08:00
|
|
|
const element = '.addthis_inline_share_toolbox';
|
2022-07-22 18:35:04 +08:00
|
|
|
if (!NexT.CONFIG.addthis || !NexT.utils.checkDOMExist(element)) return;
|
2022-07-13 21:25:15 +08:00
|
|
|
|
2022-07-22 18:35:04 +08:00
|
|
|
const addthis_js = NexT.CONFIG.addthis.js + '?pubid=' + NexT.CONFIG.addthis.cfg.pubid;
|
2022-07-13 21:25:15 +08:00
|
|
|
|
2022-10-26 22:37:03 +08:00
|
|
|
NexT.utils.lazyLoadComponent(element, function() {
|
2022-07-13 21:25:15 +08:00
|
|
|
NexT.utils.getScript(addthis_js, {
|
|
|
|
attributes: {
|
2022-10-26 22:37:03 +08:00
|
|
|
async: false
|
2022-07-13 21:25:15 +08:00
|
|
|
},
|
|
|
|
parentNode: document.querySelector(element)
|
|
|
|
});
|
|
|
|
});
|
2022-10-26 22:37:03 +08:00
|
|
|
}
|