PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / _inc / build / polldaddy-shortcode.min.js

polldaddy-shortcode.min.js in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.5, at _inc/build/polldaddy-shortcode.min.js

1 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(t,e){function d(e){try{return e?t.JSON.parse(e):null}catch{return null}}t.polldaddyshortcode={render:function(){const r=e.querySelectorAll("div.pd-rating[data-settings]");e.querySelectorAll("div.PDS_Poll[data-settings]").forEach(r=>{if(r.hasAttribute("data-pd-init-done"))return;r.setAttribute("data-pd-init-done","1");const n=d(r.getAttribute("data-settings"));if(n){let d;try{d=new t.URL(n.url,"https://invalid.tld")}catch{return!1}if("https:"!==d.protocol)return!1;if("secure.polldaddy.com"!==d.hostname&&"static.polldaddy.com"!==d.hostname)return!1;const r=d.pathname;if(!/^\/p\/\d+\.js$/.test(r))return!1;const o=e.createElement("script");o.src=d.href,o.async=!0,e.head.appendChild(o)}}),r.forEach(e=>{if(e.hasAttribute("data-pd-init-done"))return;e.setAttribute("data-pd-init-done","1");const r=d(e.getAttribute("data-settings"));if(!r)return;const n=d(r.settings);if(null===n)return;const o=`${r.id}${r.item_id}`;t[`PDRTJS_settings_${o}`]=n,void 0!==t.PDRTJS_RATING&&void 0===t[`PDRTJS_${o}`]&&(t[`PDRTJS_${o}`]=new t.PDRTJS_RATING(t[`PDRTJS_settings_${o}`]))})}},e.body.addEventListener("is.post-load",()=>t.polldaddyshortcode.render()),void 0!==t.jQuery?(t.jQuery(e.body).on("pd-script-load",()=>t.polldaddyshortcode.render()),t.jQuery(e.body).trigger("pd-script-load")):(e.body.addEventListener("pd-script-load",()=>t.polldaddyshortcode.render()),e.body.dispatchEvent(new Event("pd-script-load")))}(window,document);