This file contains 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
/** | |
* JavaScript code for Steelhouse coding exercise. | |
* Any CSS is provided in the upper CSS directory. | |
*/ | |
'use strict'; | |
/** | |
Write a function that takes a single argument, lines, which is a list of | |
strings. Each element of lines is a line of prose from some passage. You will | |
return a list of strings that is read "downward", as opposed to left-to-right. |
This file contains 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
(function($){ | |
'use strict'; | |
var $appRoot, auth, APIs, app = {}, | |
tmpl = com.marketshare.optimizer.template, | |
reportCategoryKeys = 'nav-report-categories', | |
ns = 'com.marketshare.optimizer.view.viewReporting'; | |
function updateNavigation(event) { | |
var $itemsHolder, |
This file contains 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
// Return absolute path without domain or protocol: | |
path = location.href.replace(/(.+\w\/)(.+)/,"/$2"); |
This file contains 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
// Generated on 2013-09-24 using generator-webapp 0.4.1 | |
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// # Globbing | |
// for performance reasons we're only matching one level down: |
This file contains 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
/* Eliminate glow on input fields when focused */ | |
input:focus { outline: none; } |
This file contains 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
/** | |
* author: "Joe Johnson (say2joe@gmail.com)" | |
* Debug any JavaScript Object by inserting this code into your main JavaScript file. | |
* After initiating debugging on an object (ex. myObj.debug();), your console will | |
* log the name of a [named] function and its execution time. This helps when tracing | |
* the stack method calls with many objects and method calls. | |
* Note: this most likely only works for WebKit-based browsers supporting fn.name. | |
* Also, you may copy-paste this into console before running any event-based logic. | |
**/ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta name="description" content="JS.LA - JavaScript Made Simple: Object Orientation" /> | |
<title>JS.la Presents JavaScript Made Simple: Obect Orientation</title> | |
<style> | |
h4 pre { | |
border: 1px solid #ccc; |
This file contains 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
/*! Reference: https://developers.google.com/youtube/iframe_api_reference/ */ | |
/** | |
* Based on my original (admittedly) "rush" implementation. I | |
* will be refactoring this code in a module, based on use-cases driven by business | |
* reqs once they're more solidified. enableYouTubeAPI is | |
* invoked via a Backbone View's render method after page load (used on LPs). | |
*/ | |
var MyNamespace = { | |
MySubModule: { | |
enableYouTubeAPI: function() { |
This file contains 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
switch (true) { | |
case (/Chrome/).test(navigator.userAgent): | |
console.log("You're using Chrome."); | |
break; | |
case (/MSIE/).test(navigator.userAgent): | |
console.log("Unfortunately, you're using Internet Explorer"); | |
break; | |
default: | |
console.log("You're using a different kinda browser."); | |
} |
This file contains 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
/** | |
* Extend jQuery with additional functionality to be used throughout app. | |
*/ | |
$.fn.extend({ | |
/** formData: | |
* Most form submissions will require special formatting different from | |
* a normal get request (a=val1,val2&b=val3 vs. a=val1&a=val2&b=val3). | |
* Sample use: $.getJSON(url,$("myFormElement").formData(),callback);. | |
* @return {String} Serialized form data appropriate for GET requests. | |
* @author Joe Johnson |