mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-25 00:32:01 +00:00
18 lines
8.6 KiB
HTML
18 lines
8.6 KiB
HTML
<!DOCTYPE html>
|
|
<!-- saved from url=(0076)https://public-api.wordpress.com/wp-admin/rest-proxy/#https://widgets.wp.com -->
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<script>var _wpcomProxyRequestHasCookie = false, _wpcomProxyRequestDC = 'dfw';</script>
|
|
<script type="text/javascript" src="./rlt-proxy.js.download"></script>
|
|
<script type="text/javascript">
|
|
// compute origin from location hash
|
|
var parentOrigin;
|
|
if (window.location.hash) {
|
|
parentOrigin = window.location.hash.substr(1);
|
|
}
|
|
|
|
rltInitialize({ parentOrigin: parentOrigin });
|
|
</script>
|
|
<script>!function(){var d=["Allow","Date","Content-Type","Content-Length","Link","X-WP-Total","X-WP-TotalPages"],c={},e=["https://wordpress.com","https://cloud.jetpack.com","http://wpcalypso.wordpress.com","http://widgets.wp.com","https://widgets.wp.com","https://dev-mc.a8c.com","https://mc.a8c.com","https://vrc.a8c.com","https://dserve.a8c.com","http://calypso.localhost:3000","https://calypso.localhost:3000","http://jetpack.cloud.localhost:3000","https://jetpack.cloud.localhost:3000","http://calypso.localhost:3001","https://calypso.localhost:3001","https://calypso.live","http://127.0.0.1:41050","http://send.linguine.localhost:3000"],n=window.location.hash.replace("#","").split("/",3).join("/"),s=!1,i=(-1<["https://mc.a8c.com","https://dev-mc.a8c.com","https://dev-mc.wordpress.com"].indexOf(n)&&(s=!0),{});function l(){for(var e=document.cookie.split(/;\s*/),o=0;o<e.length;o++)if(e[o].match(/^wp_api=/))return(e=e[o].split("="))[1]}var u,a=!0,r=[];function h(e){var o,n=[];function s(t,e){var o,a;if(Array.isArray(e))e.forEach(function(e,o){s(t+"["+("object"==typeof e&&null!==e?o:"")+"]",e)});else if("object"==typeof e)for(o in e)s(t+"["+o+"]",e[o]);else a=e,n.push(encodeURIComponent(t)+"="+encodeURIComponent(null==a?"":a))}if(!e)return"";for(o in e)s(o,e[o]);return n.join("&")}function f(e){return e.response?"json"===e.responseType?e.response:"blob"===e.responseType?"application/json"===e.response.type?{body:null}:e.response:JSON.parse(e.response):{body:null}}function y(p,c,i){return function(e,o){a=o,o=[],n={},s={},(o=(t=e)&&t.headers?t.headers[0]&&t.headers[0].name?t.headers:Object.keys(t.headers).map(function(e){return{name:e,value:t.headers[e]}}):o).forEach(function(e){n[e.name.toUpperCase()]=e.value}),d.forEach(function(e){var o=e.toUpperCase();n[o]?s[e]=n[o]:a&&(s[e]=a.getResponseHeader(e))}),o=s;var t,a,n,s,r=e instanceof Blob?e:e.body;m(i?[r,e.code,o,p]:[r,e.code,p],c)}}function m(e,o){o&&(e=JSON.stringify(e)),window.parent.postMessage(e,n)}function p(r,p){"string"!=typeof r.apiVersion&&(r.apiVersion="1",r.version)&&(r.apiVersion=r.version.replace(/[^0-9\.]/,""));var e,o=window.location.protocol+"//public-api.wordpress.com/rest/v"+r.apiVersion+r.path+(-1===r.path.indexOf("?")?"?":"&")+"http_envelope=1",t=(r.apiNamespace&&(o=window.location.protocol+"//public-api.wordpress.com/"+r.apiNamespace+r.path+(-1===r.path.indexOf("?")?"?":"&")+"_envelope=1"),r.query&&("string"==typeof r.query?o+="&"+r.query.replace(/^&/,""):o+="&"+h(r.query)),new XMLHttpRequest),a=rltGetToken(),o=(t.open(r.method||"GET",o),t.responseType="blob"===(r.responseType||"").toLowerCase()?"blob":"json",l());r.token?t.setRequestHeader("Authorization","Bearer "+r.token):o?t.setRequestHeader("Authorization","X-WPCOOKIE "+o+":"+(s?"1":"0")+":"+n):a&&t.setRequestHeader("Authorization","X_WPCOM_RLT "+a),r.formData&&0<r.formData.length?e=function(e){var o,t,a,n,s=new FormData;for(o in e.body)e.body.hasOwnProperty(o)&&s.append(o,e.body[o]);for(n=0;n<e.formData.length;n++)"object"==typeof e.formData[n][1]&&void 0!==e.formData[n][1].fileContents?(o=e.formData[n][0],t=e.formData[n][1].fileName,a=new Blob([e.formData[n][1].fileContents],{type:e.formData[n][1].mimeType}),s.append(o,a,t)):s.append(e.formData[n][0],e.formData[n][1]);return s}(r):r.body&&(e=JSON.stringify(r.body),t.setRequestHeader("Content-Type","application/json")),t.onload=function(){var e,o=j(t);delete c[r.callback],o?(e=JSON.parse(i[r.callback]),delete i[r.callback]):e=f(t),e.code=e.code||e.status||t.status,400===parseInt(e.code)&&a&&(b("c3po.provider.response.400","1","c"),rltInvalidateToken(a)),403===parseInt(e.code)&&a&&b("c3po.provider.response.403","1","c"),y(r.callback,p,r.supports_args)(e,this)},t.onerror=function(){var t,a,n,s;delete c[r.callback],t=r.callback,a=p,n=r.supports_args,s=!r.supports_error_obj,function(){var e=s?"error":{message:this.statusText},o=s?0:this.status;m(n?[e,o,{},t]:[e,o,t],a)}()},t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.HEADERS_RECEIVED&&j(t)){var s=r.callback;var e=t;e.responseType="text";let n=0;i[s]=null,e.addEventListener("progress",({target:e})=>{for(;;){var o=e.response.indexOf("\n",n);if(o<0)break;i[s]=e.response.slice(n,o);var t,a=JSON.parse(i[s]);a.status<200&&(t={"Content-Type":"application/x-ndjson;",status:a.status},m([a.body,207,t,s])),n=o+1}})}};o=!(!r.body||void 0===r.body.stream)&&r.body.stream;r.supports_progress&&!o&&(t.upload.onprogress=function(e){e={upload:!0,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total,callbackId:r.callback},window.parent.postMessage(e,n)},t.onprogress=function(e){e={download:!0,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total,callbackId:r.callback},window.parent.postMessage(e,n)}),(c[r.callback]=t).send(e)}function b(e,o,t){var a,n,s,r,p;return(new Image).src='https://pixel.wp.com/boom.gif?v=0.9&u=https://public-api.wordpress.com/pinghub&json={"beacons":["'+e+"."+(u||(e=!!window.opr&&!!opr.addons||!!window.opera||0<=navigator.userAgent.indexOf(" OPR/"),a="undefined"!=typeof InstallTrigger,n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=!(s=!!document.documentMode)&&!!window.StyleMedia,p=window.chrome&&void 0!==window.chrome&&"Google Inc."===window.navigator.vendor,u=e?"opera":a?"firefox":n?"safari":s?"msie":r?"edge":p?"chrome":"unknown"),u)+":"+o+"|"+t+'"]}',!0}var g={};function w(e){delete g[e]}function v(o,t){var a,e;o in g?t({body:{type:"error",text:"already subscribed"},code:444}):(a=(new Date).getTime(),(e=g[o]=new WebSocket("wss://public-api.wordpress.com"+o)).onopen=function(e){b("pinghub.conn_open_dc."+_wpcomProxyRequestDC,(new Date).getTime()-a,"ms"),t({body:{type:"open"},code:207})},e.onclose=function(e){b("pinghub.conn_close_code."+e.code,(new Date).getTime()-a,"ms"),w(o),t({body:{type:"close"},code:200})},e.onerror=function(e){b("pinghub.conn_err",(new Date).getTime()-a,"ms"),w(o),t({body:{type:"error"},code:500})},e.onmessage=function(e){t({body:{type:"message",data:e.data},code:207})})}var o,t,k,T=!1,C=!1,_=!!_wpcomProxyRequestHasCookie;function D(o,e){e=y(o.callback,e,o.supports_args);if("undefined"==typeof WebSocket)T=T||b("pinghub.restproxy.ws_unsupported","1","c"),e({body:{type:"error",data:"unsupported"},code:500});else if(T=T||b("pinghub.restproxy.ws_supported","1","c"),C=_?C||b("pinghub.restproxy.cookie","1","c"):C||b("pinghub.restproxy.nocookie","1","c"),"connect"===o.action&&v(o.path,e),"disconnect"===o.action&&(t=o.path,a=e,t in g?(g[t].close(),w(t),a({body:{type:"disconnect"},code:200})):a({body:{type:"error",data:"not connected"},code:200})),"send"===o.action){var t=o.path,a=o.message,o=e;if(t in g)try{g[t].send(a),o({body:{type:"sent"},code:201})}catch(e){o({body:{type:"error"},code:600})}else o({body:{type:"error"},code:404})}}function O(e){var o,t=!1;if(n===e.origin)if(a)r.push({data:e.data,origin:e.origin});else{if("string"==typeof e.data){try{o=JSON.parse(e.data)}catch(e){return}t=!0}else o=e.data;"object"==typeof o&&"loginMessage"!==o.type&&"rltMessage"!==o.type&&(o.metaAPI?(void 0!==o.metaAPI.accessAllUsersBlogs&&(s=!!o.metaAPI.accessAllUsersBlogs),y(o.callback,t)({body:"metaAPIupdated",code:200})):(e="/pinghub/",o.path&&o.path.slice(0,e.length)===e?D(o,t):o.abort?c[o.callback]&&c[o.callback].abort():p(o,t)))}}function j(e){return/^application[/]x-ndjson($|;)/.test(e.getResponseHeader("Content-Type"))}window.addEventListener("message",O),o=n,t=function(e){r=(e?(a=!1,r.forEach(O)):window.removeEventListener("message",O),[])},-1<e.indexOf(o)||o.match(/^https:\/\/[a-z0-9-]+\.calypso\.live$/)||o.match(/^https:\/\/([a-z0-9-]+\.)+wordpress\.com$/)?t(!0):(e=window.location.protocol+"//public-api.wordpress.com/rest/v1/sites/"+encodeURIComponent(o)+"?http_envelope=1&check_wpcom=1",(k=new XMLHttpRequest).open("GET",e),k.responseType="json",(e=l())&&k.setRequestHeader("Authorization","X-WPCOOKIE "+e+":0:"+o),k.onload=function(){var e,o=!1;200===this.status&&(e=f(this))&&e.body&&!0===e.body.isWPcom&&(o=!0),t(o)},k.send()),m("ready")}();</script>
|
|
<script type="text/javascript" data-name="TokenSigning" data-by="Web-eID extension" src="chrome-extension://ncibgoaomkmdpilpocfeponihegamlic/token-signing-page-script.js"></script></head>
|
|
<body>
|
|
</body></html> |