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
;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 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 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 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
//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 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
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 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
//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 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 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 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
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/>', { |
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
function OrdersEditDisplay() { | |
$('#OrdersEditTabs').tabs(); | |
var onDisplayLoadSuccess = function () { | |
$.each(arguments, function() { | |
$($(this).selector).off('click').on('click', 'fieldset legend', function () { | |
var fieldset = $(this).parent(); | |
var isWrappedInDiv = $(fieldset.children()[0]).is('div'); | |
if (isWrappedInDiv) { |
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
//Responsible for showing options when interacting with a song list or play list | |
define(function(){ | |
'use strict'; | |
var selector = $('#ContextMenu'); | |
//Hide the context menu whenever any click occurs not just when selecting an item. | |
$(document).click(function(){ | |
selector.offset({top:0, left:0}).hide(); | |
}); |
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
//Responsible for showing options when interacting with a song list or play list | |
define(function(){ | |
'use strict'; | |
var selector = $('#ContextMenu'); | |
//Hide the context menu whenever any click occurs not just when selecting an item. | |
$(document).click(function(){ | |
selector.offset({top:0, left:0}).hide(); | |
}); |
OlderNewer