File Editor
Directories:
.. (Back)
Files:
view.asset.php
view.css
view.js
view.rtl.css
Create New File
Create
Edit File: view.js
!function(){var e={63166:function(e,t,n){"use strict";n.d(t,{O8:function(){return o},mO:function(){return c}});const r=function(e,t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+o+t+"="+n},o=function(e){const t=new Date;t.setTime(t.getTime()+31536e6),document.cookie="jp-premium-content-session="+e+"; expires="+t.toGMTString()+"; path=/"},c=function(e,t){let n=r(document.location.href,"token",e);t&&Object.keys(t).forEach((e=>{n=r(n,e,t[e])})),document.location.href=n}},80425:function(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},47701:function(e){"use strict";e.exports=window.wp.domReady}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var c=t[r]={exports:{}};return e[r](c,c.exports,n),c.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"}(),function(){"use strict";n(80425)}(),function(){"use strict";var e=n(47701),t=n.n(e),r=n(63166);t()((function(){const e=document.querySelector(".wp-block-jetpack-subscriptions__container form");if(!e)return;let t="";e.payments_attached||(e.payments_attached=!0,e.addEventListener("submit",(function(n){const o=e.querySelector("input[type=email]").value,c=o?`&email=${encodeURIComponent(o)}`:"",s=e.querySelector("input[name=post_id]")?.value,i=s?`&post_id=${s}`:"",u=e.querySelector("input[name=tier_id]")?.value,a=u?`&tier_id=${u}`:"";if(e.resubmitted||!o)return;n.preventDefault();const l=Array.from(e.querySelectorAll(".wp-block-jetpack-subscriptions__newsletter-category input[type=checkbox]")),p=l.filter((e=>!e.checked)).map((e=>e.value)),d=p.length>0&&p.length!==l.length;let f="https://subscribe.wordpress.com/memberships/?blog="+e.dataset.blog+"&plan=newsletter&source=jetpack_subscribe&post_access_level="+e.dataset.post_access_level+"&display=alternate"+i+a+c;d&&(f+="&excluded_newsletter_categories="+p.join(",")),window.scrollTo(0,0),tb_show(null,f+"&TB_iframe=true",null);const m=function(e){if("https://subscribe.wordpress.com"===e.origin&&e.data){const n=JSON.parse(e.data);n&&n.result&&n.result.jwt_token?(t=n.result.jwt_token,(0,r.O8)(t)):n&&"close"===n.action&&t?(0,r.mO)(t,{subscribe:"success"}):n&&"close"===n.action&&(window.removeEventListener("message",m),tb_remove())}};window.addEventListener("message",m,!1);document.querySelector("#TB_window").classList.add("jetpack-memberships-modal"),window.scrollTo(0,0)})))}))}()}();
Save Changes
Rename File
Rename