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
require(['jquery', 'underscore'], function () { | |
// Backbone.js 0.9.9 | |
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://backbonejs.org | |
(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
define([ | |
'utility' | |
], function (Utility) { | |
'use strict'; | |
var PlaylistItemView = Backbone.View.extend({ | |
tagName: 'li', | |
className: 'playlistItem', | |
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 micro-templating, similar to John Resig's implementation. | |
// Underscore templating handles arbitrary delimiters, preserves whitespace, | |
// and correctly escapes quotes within interpolated code. | |
_.template = function (text, data, settings) { | |
var render; | |
settings = _.defaults({}, settings, _.templateSettings); | |
// Combine delimiters into one regular expression via alternation. | |
var matcher = new RegExp([ | |
(settings.escape || noMatch).source, |
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
var YouTubeDataAPI = Backbone.Model.extend({ | |
sendV2ApiRequest: function(options) { | |
return $.ajax({ | |
url: options.url, | |
data: $.extend({}, options.data, { | |
// The v parameter specifies the version of the API that YouTube should use to handle the API request. | |
v: 2, | |
// The alt parameter specifies the format of the feed to be returned. |
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
/*jslint node: true*/ | |
// Provides methods which may be executed from the command prompt by being in this files cwd. | |
// Type grunt to run the default method, or "grunt paramater" to run a specific method. | |
// | |
// Options: | |
// * grunt: Start up a server, run Jasmine test cases, watch for changes. | |
// * grunt test: Start up a server, run Jasmine test cases. | |
// * grunt lint: Display linter errors about the project | |
// * grunt dist: Create a dist folder with a .zip containing the extension ready to be uploaded | |
// |
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
//NOTE: BUG ISSUE 949 HAS BEEN PATCHED IN THIS VERSION: http://code.google.com/p/jstree/issues/detail?id=949 THE DEFAULT THEMES VALUE HAS BEEN SET. | |
/* | |
* jsTree 1.0-rc3 | |
* http://jstree.com/ | |
* | |
* Copyright (c) 2010 Ivan Bozhanov (vakata.com) | |
* | |
* Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html |
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
// Enables progressive rendering of children by keeping track of indices which are currently rendered. | |
minRenderedIndex: 0, | |
maxRenderedIndex: 25, | |
addItemView: function(item, ItemView, index) { | |
if (index >= this.minRenderedIndex || index < this.maxRenderedIndex) { | |
Backbone.Marionette.CompositeView.prototype.addItemView.apply(this, arguments); | |
} | |
}, |
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 () { | |
var g, h = this; | |
function l(a) { | |
a = a.split("."); | |
for (var b = h, c; c = a.shift();) | |
if (null != b[c]) b = b[c]; | |
else return null; | |
return b | |
} |