This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
/** prime slots */ | |
primeAllSlots(_slotSelector); | |
/** rock & roll */ | |
var t = function(i,sw,f) { | |
i = i || 0; // count loops | |
sw = (!sw) ? false : (document.write.toString().indexOf('[native code]') > -1); // look for docwrite swap (brightTag) | |
f = f || 0; // flip count... render when it's back (2) | |
//console.log('called',i,sw,f); | |
CARS.pushDebug('[asyncAdRenderer]', 'Called ', i, sw, f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
stylus: { | |
buildall: { | |
files: [ | |
{ expand: true, cwd: 'src/', src: ['**/*.styl'], dest: 'out', ext: '.css' } | |
], | |
options: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ******************************* * | |
* Cars.com Universal Model | |
* Updated: APR 2013 | |
* Version: AMD 1.0 | |
* This file creates consistent | |
* model singleton for Cars.com | |
* @TODO incorporate stash for caching | |
* ******************************* */ | |
define(['jquery', 'can', 'modules/common/stash'], function($, can, stash) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cars.com ad tag generator | |
* Updated: JUN 2013 | |
* Version: AMD 1.5 | |
* This file creates consistent ad logic for generated DFP tags for Cars.com ad serving | |
* @todo rules to ensure targeting data prioritization | |
* @todo document nomenclature/terminology | |
* @todo move to preferences.js | |
* @todo cache/clear targeting data where possible (gms/mvis) | |
* @doc http://proddev.cars.com/wiki/technical/core/advertising/async-ad-renderer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cars.com Stash Module | |
* @version AMD 1.0 | |
* @module modules/common/stash | |
* Provides a facade around local storage functionality | |
* - ensures a technology agnostic approach | |
* - ensure standard interface for storage crud | |
*/ | |
define([], function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* zipCaptureForm.js | |
* Base class for creating a form with FE zip validation | |
* - handles form submit | |
* - handles server-side zip validation | |
* - handles presenting zip capture modal | |
*/ | |
define(['jquery', 'can', 'jquerytools', 'canSuper'], function($, can) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A module to defer loading of assets (images-only at current) until viewed by user. | |
* Each image will handle it's own logic of whether to load or not via custom event. | |
* To use, load module and call init(); | |
* This does have an SEO impact for images; ensure that implementing is desired. | |
* The element selector is assumed to be an img resource with a data- attribute. | |
* @author Clay Johnson | |
* @version 20130124 | |
* @example | |
* To defer an image load, insert: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loadAfterJQ = function(fn) { | |
if (!!window.jQuery) { | |
fn(); | |
console.log('jQuery is loaded'); | |
} else { | |
console.log('jQuery is not loaded'); | |
setTimeout(function() { loadAfterJQ(fn) }, 250); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Template for 'persistent' AMD module | |
* - with jQuery and default attributes support | |
* - setDefaults is only public method for module | |
* @example | |
* after module is loaded, fire with: | |
* $(window).trigger("EVENTNAME",[{ "foo": "bar" }]); | |
*/ | |
define(['jquery'], function($) { |