File manager - Edit - /home/opticamezl/www/newok/531c5/plg_quickicon_privacycheck.zip
Back
PK G@�\�X�w� � js/privacycheck.jsnu �[��� /** * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ (document => { const checkPrivacy = () => { const variables = Joomla.getOptions('js-privacy-check'); const ajaxUrl = variables.plg_quickicon_privacycheck_ajax_url; const url = variables.plg_quickicon_privacycheck_url; const text = variables.plg_quickicon_privacycheck_text; const quickicon = document.getElementById('plg_quickicon_privacycheck'); const link = quickicon.querySelector('span.j-links-link'); /** * DO NOT use fetch() for QuickIcon requests. They must be queued. * * @see https://github.com/joomla/joomla-cms/issues/38001 */ Joomla.enqueueRequest({ url: ajaxUrl, method: 'GET', promise: true }).then(xhr => { const response = xhr.responseText; const request = JSON.parse(response); if (request.data.number_urgent_requests) { // Quickicon on dashboard shows message const countBadge = document.createElement('span'); countBadge.classList.add('badge', 'text-dark', 'bg-light'); countBadge.textContent = request.data.number_urgent_requests; link.textContent = `${text.REQUESTFOUND} `; link.appendChild(countBadge); // Quickicon becomes red quickicon.classList.add('danger'); // Span in alert const countSpan = document.createElement('span'); countSpan.classList.add('label', 'label-important'); countSpan.textContent = `${text.REQUESTFOUND_MESSAGE.replace('%s', request.data.number_urgent_requests)} `; // Button in alert to 'view requests' const requestButton = document.createElement('button'); requestButton.classList.add('btn', 'btn-primary', 'btn-sm'); requestButton.setAttribute('onclick', `document.location='${url}'`); requestButton.textContent = text.REQUESTFOUND_BUTTON; const div = document.createElement('div'); div.classList.add('alert', 'alert-error', 'alert-joomlaupdate'); div.appendChild(countSpan); div.appendChild(requestButton); // Add elements to container for alert messages const container = document.querySelector('#system-message-container'); container.insertBefore(div, container.firstChild); } else { quickicon.classList.add('success'); link.textContent = text.NOREQUEST; } }).catch(() => { quickicon.classList.add('danger'); link.textContent = text.ERROR; }); }; // Give some times to the layout and other scripts to settle their stuff window.addEventListener('load', () => { setTimeout(checkPrivacy, 360); }); })(document); PK G@�\�(�u js/privacycheck-es5.min.jsnu �[��� (function(){"use strict";/** * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */(function(e){var p=function(){var c=Joomla.getOptions("js-privacy-check"),u=c.plg_quickicon_privacycheck_ajax_url,v=c.plg_quickicon_privacycheck_url,t=c.plg_quickicon_privacycheck_text,a=e.getElementById("plg_quickicon_privacycheck"),r=a.querySelector("span.j-links-link");Joomla.enqueueRequest({url:u,method:"GET",promise:!0}).then(function(_){var E=_.responseText,i=JSON.parse(E);if(i.data.number_urgent_requests){var l=e.createElement("span");l.classList.add("badge","text-dark","bg-light"),l.textContent=i.data.number_urgent_requests,r.textContent=t.REQUESTFOUND+" ",r.appendChild(l),a.classList.add("danger");var o=e.createElement("span");o.classList.add("label","label-important"),o.textContent=t.REQUESTFOUND_MESSAGE.replace("%s",i.data.number_urgent_requests)+" ";var s=e.createElement("button");s.classList.add("btn","btn-primary","btn-sm"),s.setAttribute("onclick","document.location='"+v+"'"),s.textContent=t.REQUESTFOUND_BUTTON;var n=e.createElement("div");n.classList.add("alert","alert-error","alert-joomlaupdate"),n.appendChild(o),n.appendChild(s);var d=e.querySelector("#system-message-container");d.insertBefore(n,d.firstChild)}else a.classList.add("success"),r.textContent=t.NOREQUEST}).catch(function(){a.classList.add("danger"),r.textContent=t.ERROR})};window.addEventListener("load",function(){setTimeout(p,360)})})(document)})(); PK G@�\/"+h� � js/privacycheck-es5.jsnu �[��� (function () { 'use strict'; /** * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ (function (document) { var checkPrivacy = function checkPrivacy() { var variables = Joomla.getOptions('js-privacy-check'); var ajaxUrl = variables.plg_quickicon_privacycheck_ajax_url; var url = variables.plg_quickicon_privacycheck_url; var text = variables.plg_quickicon_privacycheck_text; var quickicon = document.getElementById('plg_quickicon_privacycheck'); var link = quickicon.querySelector('span.j-links-link'); /** * DO NOT use fetch() for QuickIcon requests. They must be queued. * * @see https://github.com/joomla/joomla-cms/issues/38001 */ Joomla.enqueueRequest({ url: ajaxUrl, method: 'GET', promise: true }).then(function (xhr) { var response = xhr.responseText; var request = JSON.parse(response); if (request.data.number_urgent_requests) { // Quickicon on dashboard shows message var countBadge = document.createElement('span'); countBadge.classList.add('badge', 'text-dark', 'bg-light'); countBadge.textContent = request.data.number_urgent_requests; link.textContent = text.REQUESTFOUND + " "; link.appendChild(countBadge); // Quickicon becomes red quickicon.classList.add('danger'); // Span in alert var countSpan = document.createElement('span'); countSpan.classList.add('label', 'label-important'); countSpan.textContent = text.REQUESTFOUND_MESSAGE.replace('%s', request.data.number_urgent_requests) + " "; // Button in alert to 'view requests' var requestButton = document.createElement('button'); requestButton.classList.add('btn', 'btn-primary', 'btn-sm'); requestButton.setAttribute('onclick', "document.location='" + url + "'"); requestButton.textContent = text.REQUESTFOUND_BUTTON; var div = document.createElement('div'); div.classList.add('alert', 'alert-error', 'alert-joomlaupdate'); div.appendChild(countSpan); div.appendChild(requestButton); // Add elements to container for alert messages var container = document.querySelector('#system-message-container'); container.insertBefore(div, container.firstChild); } else { quickicon.classList.add('success'); link.textContent = text.NOREQUEST; } }).catch(function () { quickicon.classList.add('danger'); link.textContent = text.ERROR; }); }; // Give some times to the layout and other scripts to settle their stuff window.addEventListener('load', function () { setTimeout(checkPrivacy, 360); }); })(document); })(); PK G@�\#p� � js/privacycheck.min.jsnu �[��� /** * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */(e=>{const u=()=>{const r=Joomla.getOptions("js-privacy-check"),p=r.plg_quickicon_privacycheck_ajax_url,_=r.plg_quickicon_privacycheck_url,t=r.plg_quickicon_privacycheck_text,n=e.getElementById("plg_quickicon_privacycheck"),s=n.querySelector("span.j-links-link");Joomla.enqueueRequest({url:p,method:"GET",promise:!0}).then(E=>{const g=E.responseText,o=JSON.parse(g);if(o.data.number_urgent_requests){const i=e.createElement("span");i.classList.add("badge","text-dark","bg-light"),i.textContent=o.data.number_urgent_requests,s.textContent=`${t.REQUESTFOUND} `,s.appendChild(i),n.classList.add("danger");const l=e.createElement("span");l.classList.add("label","label-important"),l.textContent=`${t.REQUESTFOUND_MESSAGE.replace("%s",o.data.number_urgent_requests)} `;const a=e.createElement("button");a.classList.add("btn","btn-primary","btn-sm"),a.setAttribute("onclick",`document.location='${_}'`),a.textContent=t.REQUESTFOUND_BUTTON;const c=e.createElement("div");c.classList.add("alert","alert-error","alert-joomlaupdate"),c.appendChild(l),c.appendChild(a);const d=e.querySelector("#system-message-container");d.insertBefore(c,d.firstChild)}else n.classList.add("success"),s.textContent=t.NOREQUEST}).catch(()=>{n.classList.add("danger"),s.textContent=t.ERROR})};window.addEventListener("load",()=>{setTimeout(u,360)})})(document); PK G@�\�z��� � js/privacycheck.min.js.gznu �[��� � }T�n7|�W�l��E� P�V/h�^��J�D��'Z<�L.-�{AI1 ��<�.gf�{vzzBN��ڷ�`�®8�p���d#c���M!B���8-�_�6^���V+��}c��Ie��B�w�eɿin�&���'�xG>�U�O"