Skip to content

Instantly share code, notes, and snippets.

🙃
Probably Thinking About Code

Patrick McDougle patrick-mcdougle

🙃
Probably Thinking About Code
  • POPSUGAR.
  • San Francisco, CA
Block or report user

Report or block patrick-mcdougle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@patrick-mcdougle
patrick-mcdougle / pbjs.js
Last active May 23, 2017
PBJS Proposed Change
View pbjs.js
...
function r(e, o) {
pbjs.initAdserverSet = !0,
pbjs.requestBids({
adUnits: d(e),
bidsBackHandler: function() {
googletag.cmd.push(function() {
pbjs.setTargetingForGPTAsync(),
if (typeof o !== 'undefined') {
window.googletag.pubads().refresh(p(e), o)
@patrick-mcdougle
patrick-mcdougle / gpt-js.tpl
Created Apr 12, 2017
Gallery Page Ads Code
View gpt-js.tpl
//Setup Amazon
var amznads = amznads || {};
amznads.asyncParams = {
'id': '3217',
'callbackFn': function() {
try {
amznads.setTargetingForGPTAsync('amznslots');
} catch (e) {}
},
@patrick-mcdougle
patrick-mcdougle / context.js
Last active Mar 6, 2017
Waypoint DOM removal detection
View context.js
...
/* Public */
/* http://imakewebthings.com/waypoints/api/context-refresh */
Context.prototype.refresh = function() {
/*eslint-disable eqeqeq */
var isWindow = this.element == this.element.window
/*eslint-enable eqeqeq */
var contextOffset = isWindow ? undefined : this.adapter.offset()
var triggeredGroups = {}
var axes
View app~Resources~WebProfilerBundle~views~Profiler~base_js.html.twig
<script{% if csp_script_nonce is defined and csp_script_nonce %} nonce={{ csp_script_nonce }}{% endif %}>/*<![CDATA[*/
{# Caution: the contents of this file are processed by Twig before loading
them as JavaScript source code. Always use '/*' comments instead
of '//' comments to avoid impossible-to-debug side-effects #}
Sfjs = (function() {
"use strict";
var classListIsSupported = 'classList' in document.documentElement;
You can’t perform that action at this time.