Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUC update to include Native Phase 2 spec: #106

Merged
merged 16 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions dist/load-cookie.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should not be checked in correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with the .DS_Store binary.

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/javascript">
// cookie-sync start
!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){"use strict";var o=function(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}n.default=e,t&&t.set(e,n);return n}(n(1));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,i,s,a={rubicon:"https://prebid-server.rubiconproject.com/cookie_sync",appnexus:"https://prebid.adnxs.com/pbs/v1/cookie_sync"},l=(r=v("endpoint",window.location.search))&&a.hasOwnProperty(r)?a[r]:"https://prebid.adnxs.com/pbs/v1/cookie_sync",d=function(e){if(e){var t=e.split(",").reduce(function(e,t){var n=t.split(":");return 2===n.length&&""!==n[0]&&""!==n[1]&&(e[n[0]]=/^\d+$/.test(n[1])?parseInt(n[1]):n[1]),e},{});return t&&Object.keys(t).length?t:void 0}}(v("args",window.location.search)),p=v("max_sync_count",window.location.search),g=function(e){if(isNaN(e)||e<0)return 9007199254740991;return e}(parseInt(p||10,10)),y=function(e){if(0===e||1===e)return e;console.log("Ignoring gdpr param, it should be 1 or 0")}(parseInt(v("gdpr",window.location.search),10)),m=function(e){if(e)return e;console.log("Ignoring gdpr_consent param, it should be a non empty value")}(v("gdpr_consent",window.location.search)),b=new RegExp(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);function h(e,t,n,r){t&&b.test(t)?"image"===e||"redirect"===e?(console.log('Invoking image pixel user sync for bidder: "'.concat(n,'"')),function(e,t){var n=new Image;n.addEventListener("load",t),n.addEventListener("error",t),n.src=e}(t,r)):"iframe"==e?(console.log('Invoking iframe pixel user sync for bidder: "'.concat(n,'"')),function(e,t,n){if(!e)return;var r=o.getEmptyIframe(0,0);r.id="sync_".concat(t,"_").concat(Date.now()),r.src=e,r.onload=n,o.insertElement(r,document,"html")}(t,n,r)):(console.log('User sync type "'.concat(e,'" not supported for bidder: "').concat(n,'"')),r()):(console.log('No valid sync url for bidder "'.concat(n,'": ').concat(t)),r())}function v(e,t){var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}!function(e,t,n,r){var o=3<arguments.length&&void 0!==r?r:{};try{var i,c=o.method||(n?"POST":"GET"),s="object"===f(t)?t:{success:function(){console.log("xhr success")},error:function(e){console.log("xhr error",null,e)}};if("function"==typeof t&&(s.success=t),(i=new window.XMLHttpRequest).onreadystatechange=function(){if(4===i.readyState){var e=i.status;200<=e&&e<300||304===e?s.success(i.responseText,i):s.error(i.statusText,i)}},i.ontimeout=function(){console.log("xhr timeout after ",i.timeout,"ms")},"GET"===c&&n){var a=parseURL(e,o);u(a.search,n),e=formatURL(a)}i.open(c,e),i.timeout=3e3,o.withCredentials&&(i.withCredentials=!0),o.preflight&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("Content-Type",o.contentType||"text/plain"),"POST"===c&&n?i.send(n):i.send()}catch(e){console.log("xhr construction",e)}}(l,function(e){var t=JSON.parse(e);"ok"!==t.status&&"no_cookie"!==t.status||t.bidder_status&&!function e(t){if(0!==t.length){var n=t.pop();n.no_cookie?h(n.usersync.type,n.usersync.url,n.bidder,e.bind(null,t)):e(t)}}(t.bidder_status)},((s=(i=d)&&"object"===f(i)?i:{}).limit=g,y&&(s.gdpr=y),m&&(s.gdpr_consent=m),JSON.stringify(s)),{withCredentials:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyIframe=function(e,t){var n=document.createElement("iframe");return n.setAttribute("frameborder",0),n.setAttribute("scrolling","no"),n.setAttribute("marginheight",0),n.setAttribute("marginwidth",0),n.setAttribute("TOPMARGIN",0),n.setAttribute("LEFTMARGIN",0),n.setAttribute("allowtransparency","true"),n.setAttribute("width",t),n.setAttribute("height",e),n},t.insertElement=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}}]);
// end.
</script>
</head>
<body>
</body>
</html>
Loading