File Editor
Directories:
.. (Back)
carousel
comment-likes
contact-form
custom-css
custom-post-types
images
infinite-scroll
likes
masterbar
related-posts
scan
sharedaddy
shortcodes
theme-tools
tiled-gallery
videopress
widget-visibility
widgets
wordads
Files:
accessible-focus.min.asset.php
accessible-focus.min.js
activation-modal.asset.php
activation-modal.css
activation-modal.js
activation-modal.js.LICENSE.txt
activation-modal.rtl.css
admin.asset.php
admin.css
admin.js
admin.js.LICENSE.txt
admin.rtl.css
connect-button.min.asset.php
connect-button.min.js
crowdsignal-shortcode.min.asset.php
crowdsignal-shortcode.min.js
crowdsignal-survey.min.asset.php
crowdsignal-survey.min.js
facebook-embed.min.asset.php
facebook-embed.min.js
gallery-settings.min.asset.php
gallery-settings.min.js
jetpack-admin.min.asset.php
jetpack-admin.min.js
jetpack-connection-banner.min.asset.php
jetpack-connection-banner.min.js
jetpack-deactivate-dialog.min.asset.php
jetpack-deactivate-dialog.min.js
jetpack-modules.min.asset.php
jetpack-modules.min.js
jetpack-modules.models.min.asset.php
jetpack-modules.models.min.js
jetpack-modules.views.min.asset.php
jetpack-modules.views.min.js
jetpack-recommendations-banner.min.asset.php
jetpack-recommendations-banner.min.js
plugins-page.asset.php
plugins-page.css
plugins-page.js
plugins-page.js.LICENSE.txt
plugins-page.rtl.css
polldaddy-shortcode.min.asset.php
polldaddy-shortcode.min.js
static-noscript-notice.html
static-version-notice.html
static.html
static.js.LICENSE.txt
style.min.css
style.min.rtl.css
twitter-timeline.min.asset.php
twitter-timeline.min.js
Create New File
Create
Edit File: polldaddy-shortcode.min.js
!function(t,e){function d(e){try{return e?t.JSON.parse(e):null}catch(t){return null}}t.polldaddyshortcode={render:function(){const n=e.querySelectorAll("div.pd-rating[data-settings]");if(e.querySelectorAll("div.PDS_Poll[data-settings]").forEach((n=>{if(n.hasAttribute("data-pd-init-done"))return;n.setAttribute("data-pd-init-done","1");const i=d(n.getAttribute("data-settings"));if(i){let d;try{d=new t.URL(i.url,"https://invalid.tld")}catch(t){return!1}if("secure.polldaddy.com"!==d.hostname&&"static.polldaddy.com"!==d.hostname)return!1;const n=d.pathname;if(!/\/?p\/\d+\.js/.test(n))return!1;const r=e.createElement("script");r.src=i.url,r.async=!0,e.head.appendChild(r)}})),n.length){let t="";if(n.forEach((e=>{if(e.hasAttribute("data-pd-init-done"))return;e.setAttribute("data-pd-init-done","1");const n=d(e.getAttribute("data-settings"));n&&(t+=`\n\t\t\t\t\t\tPDRTJS_settings_${n.id}${n.item_id} = ${n.settings};\n\t\t\t\t\t\tif ( typeof PDRTJS_RATING !== 'undefined' ) {\n\t\t\t\t\t\t\tif ( typeof PDRTJS_${n.id}${n.item_id} === 'undefined' ) {\n\t\t\t\t\t\t\t\tPDRTJS_${n.id}${n.item_id} =\n\t\t\t\t\t\t\t\t\tnew PDRTJS_RATING( PDRTJS_settings_${n.id}${n.item_id} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t`)})),t){const d=e.querySelector("#polldaddyRatings");if(d){const n=e.createElement("script");n.id="polldaddyDynamicRatings",n.text=t,d.after(n)}}}}},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);
Save Changes
Rename File
Rename