PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 7.8
Tagembed: Social Media Feeds and Customer Reviews Widget v7.8
7.8 7.5 7.6 7.7 7.4 trunk 3.10 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 All 43 releases
← All changes | assets/js/loader.js +16 -6 3.97.8 View file →
@@ -1,15 +1,25 @@
1 -let __tagembedLoaderImageCustomPath = "https://cdn.tagembed.com/libraries/loader/images/loader.gif";
2 -if (typeof TAGEMBED_PLUGIN_URL_JS != "undefined") {
3 - __tagembedLoaderImageCustomPath = TAGEMBED_PLUGIN_URL_JS + 'assets/images/loader.gif';
1 +let __tagembedLoaderImageCustomPath = __tagembed__pluginLoaderImageUrlObj.__tagembed__pluginLoaderImageUrl + 'assets/images/loader.gif';
2 +if (typeof __tagembed__plugin_url_for_js != "undefined") {
3 + __tagembedLoaderImageCustomPath = __tagembed__plugin_url_for_js + 'assets/images/loader.gif';
4 4 }
5 5 function __tagembed__open_loader(text = '', loaderImage = '') {
6 6 text = (text) ? text : 'Please Wait...';
7 7 loaderImage = (loaderImage) ? loaderImage : __tagembedLoaderImageCustomPath;
8 8 document.body.style.cursor = "wait";
9 - let elem = document.createElement('div');
10 - elem.innerHTML = '<div id="__tagembed__loader" class="__tagembed__loader-overlay"><div class="__tagembed__loader"><img src="' + loaderImage + '"/><br/>' + text + '</div></div>';
11 - document.body.appendChild(elem.firstChild);
9 + /* Built with DOM methods so no markup is produced from the arguments. */
10 + let overlay = document.createElement('div');
11 + overlay.setAttribute('id', '__tagembed__loader');
12 + overlay.className = '__tagembed__loader-overlay';
13 + let inner = document.createElement('div');
14 + inner.className = '__tagembed__loader';
15 + let image = document.createElement('img');
16 + image.setAttribute('src', loaderImage);
17 + inner.appendChild(image);
18 + inner.appendChild(document.createElement('br'));
19 + inner.appendChild(document.createTextNode(text));
20 + overlay.appendChild(inner);
21 + document.body.appendChild(overlay);
12 22 }
13 23 function __tagembed__close_loader() {
14 24 document.body.style.cursor = "auto";
15 25 let elem = document.querySelector('#__tagembed__loader');