Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Pjura mpjura

  • Hearst Digital Media
  • NY
View GitHub Profile
View ae.js
var aeConfig = {
//URL of the Audience Engine end point
endpoint: "engine.hdmtools.com/get_teaser_block.json.php",
//Array of "blocks" (lists of stories) created in Audience Engine
blocks: [
{
//Each block has a name
name: "Smart Tout?",
//The container of the module being populated by Audience Engine
@mpjura
mpjura / override-document-write.js
Last active Aug 29, 2020
Override document.write
View override-document-write.js
(function() {
var old = document.write;
document.write = function( content ) {
if ( "interactive" === document.readyState ) {
console.log("document.write called after page load: ", content );
// optional.. safely append the content
// document.body.appendChild( content );
return;
}
@mpjura
mpjura / _article.scss
Last active Dec 11, 2015
Typography/Layout Placeholders
View _article.scss
// base _article.scss
// ------------------
.article-hed {
@extend %layout-article-hed;
@extend %type-article-hed;
}
.article-dek {
@extend %layout-article-dek;
@extend %type-article-dek;
@mpjura
mpjura / SassMeister-input.scss
Created Jan 18, 2016
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.3.2)
// ----
%placeholder {
width: 100px;
height: 100px;
}
%placeholder {
@mpjura
mpjura / constant.js
Last active May 3, 2016
Constants Implementation
View constant.js
define( "constants", [ "utils" ], function( Utils ) {
/**
* _constants is a private object that will hold the
* constant values. Hidden behind a closure to prevent
* modules from changing "constant" values once set.
* @type {Object}
*/
var _constants = {},
/**