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
.bootstrap .multiselect-container { | |
position: absolute; | |
list-style-type: none; | |
margin: 0; | |
padding: 0; | |
} | |
.bootstrap .multiselect-container .input-group { | |
margin: 5px; | |
} | |
.bootstrap .multiselect-container > li { |
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
_.mixin({ | |
// Inspired by: https://gist.github.com/danro/7846358 | |
// Leverage requestAnimationFrame for throttling function calls instead of setTimeout for better perf. | |
throttleFramerate: function(callback) { | |
var wait = false; | |
var args = null; | |
var context = null; | |
return function() { | |
if (!wait) { |
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
Koyaanisqatsi Movie Full Soundtrack - Phillip Glass (1982),t-t8w08QNJM | |
Halo 4 OST - Beauty of Cortana,C585gsBarW8 | |
Games of Thrones - House Stark Theme,SZrDEUldGr0 | |
Owl City Rainbow Veins,2EsMHFXdLxI | |
Basil Poledouris - Riddle Of Steel / Riders Of Doom,onGWF8mz1Zw | |
Trans-Siberian Orchestra: Christmas Dreams,KrvGklFCb6c | |
Theophany - Time's End - Majora's Mask Remixed,F4jdLygR-dI | |
Stabilised Zelda: Symphony of the Goddesses- London 2013,VujV19LQh24 | |
Passenger - Let Her Go [Official Video],RBumgq5yVrA | |
Wayne County | Storm the gates of heaven | 01. Storm the gates of heaven,79fk08Ax774 |
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
;Column1: | |
;MouseClick("left", 420, 365, 1, 1);Smoke err day! | |
;MouseClick("left", 420, 440, 1, 1) | |
;MouseClick("left", 420, 555, 1, 1) | |
;MouseClick("left", 420, 650, 1, 1) | |
;Column2: | |
;MouseClick("left", 550, 365, 1, 1) | |
;MouseClick("left", 550, 440, 1, 1) | |
;MouseClick("left", 550, 555, 1, 1) |
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 updateSoundIcon = function(volume){ | |
//Repaint the amount of white filled in the bar showing the distance the grabber has been dragged. | |
var backgroundImage = '-webkit-gradient(linear,left top, right top, from(#ccc), color-stop('+ volume/100 +',#ccc), color-stop('+ volume/100+',rgba(0,0,0,0)), to(rgba(0,0,0,0)))'; | |
volumeSlider.css('background-image', backgroundImage); | |
var active = '#fff'; | |
var inactive = '#555'; | |
//Paint the various bars indicating the sound level. | |
var fillColor = volume >= 25 ? active : inactive; |
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
//Randomizes the playlist and then saves it. | |
shuffle: function () { | |
var i, j, t; | |
for (i = 1; i < playlist.songs.length; i++) { | |
j = Math.floor(Math.random() * (1 + i)); // choose j in [0..i] | |
if (j !== i) { | |
t = playlist.songs[i]; // swap songs[i] and songs[j] | |
playlist.songs[i] = playlist.songs[j]; | |
playlist.songs[j] = t; | |
} |
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
playableVideos.sort(function(a,b){ | |
return levDist(a.title, text) - levDist(b.title, text); | |
}); | |
var levDist = function(s, t) { | |
var d = []; //2d matrix | |
// Step 1 | |
var n = s.length; | |
var m = t.length; |
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! The wonderful world where you can't do this: | |
chrome.storage.sync.set({playlist.id: JSON.stringify(playlist)}); | |
//BUT! You can do this! | |
var keyValuePair = {}; | |
keyValuePair[playlist.id] = JSON.stringify(playlist); | |
chrome.storgae.sync.set(keyValuePair); |
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 onReady = function(){ | |
var waitForPlaylistAndPort = setInterval(function(){ | |
playlist = playlists.getSelectedPlaylist(); | |
if(playlist && port){ | |
clearInterval(waitForPlaylistAndPort); | |
sendUpdate(); | |
//If there is a song to cue might as well have it ready to go. |
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
for (var i = 0; i < songs.length; i++){ | |
//Wrap in a closure to preserve song index for each iteration. | |
//If you don't do this the contextmenu method will always have the last song. | |
(function(i){ | |
var listItem = $('<li/>').appendTo(songList); | |
var song = songs[i]; | |
var link = $('<a/>', { |