m3g4p0p

cache purge

Sep 29th, 2020
801
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}({5:function(e,t){const n=(e,t,n)=>Array.from(e.querySelectorAll("#edit-zone ~ * "+t),n),r=document.getElementById("emcmaintable")?window.frames[0].document:document,o=n(r,"a",e=>e.href),i=n(r,"img",e=>e.src);((e,t)=>e.reduce((e,...n)=>e.then(()=>t(...n)),Promise.resolve()))([...o,...i].filter(e=>e.trim()).map(e=>new URL(e)).filter(e=>e.origin===window.location.origin).map(e=>e.origin+e.pathname).filter((e,t,n)=>!n.slice(0,t).includes(e)),(e,t,n)=>(document.write(`<p>\n    (${t+1}/${n.length}) Purging\n    <a target="_blank" href="${e}">${e}</a>\n  </p>`),fetch(e+"/@@plone.cachepurging.purge").then(e=>{if(!e.ok)throw new Error(e.statusText);return e}).then(e=>Promise.all([e.text(),e.statusText])).then(([e,t])=>document.write(`\n      <details>\n        <summary style="color: green;">${t}</summary>\n        <pre>${(e=>Object.assign(document.createElement("div"),{innerHTML:e}).textContent)(e).trim()||"[no response text]"}</pre>\n      </details>\n    `)).catch(e=>document.write(`<p style="color: red;">${e}</p>`)))).then(()=>document.write('<p style="\n  font-weight: bold;\n  margin: 2em;\n  text-align: center;\n">Done!</p>'))}});
RAW Paste Data