From 2f6717bd76609fb9cf6806b7140c99028c41f502 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 16 Nov 2014 21:33:43 -0800 Subject: [PATCH] Remove anchor stuff and update readme --- README.md | 1 - anchor.js | 14 -------------- index.html | 1 - winamp.js | 18 ++++++++---------- 4 files changed, 8 insertions(+), 26 deletions(-) delete mode 100644 anchor.js diff --git a/README.md b/README.md index adec581e..d4efe2bd 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ Works in modern versions of Firefox, Safari and Chrome. Untested in IE. ## Features - Drag in local sound or skin files or load them via the "eject" button -- Open a url using the upper left hand corner "options" icon - "Shade" mini-mode ## Tested in modern versions of diff --git a/anchor.js b/anchor.js deleted file mode 100644 index e801b6d1..00000000 --- a/anchor.js +++ /dev/null @@ -1,14 +0,0 @@ -function anchorArgument(argument, defaultValue) { - args = []; - pairs = window.location.hash.slice(1).split("&"); - for (var i = 0, len = pairs.length; i < len; i++) { - pair = pairs[i]; - eq = pair.indexOf("="); - if(eq) { - key = decodeURIComponent(pair.slice(0, eq)); - value = decodeURIComponent(pair.slice(eq + 1)); - args[key] = value; - } - } - return args[argument] ? args[argument] : defaultValue; -} diff --git a/index.html b/index.html index 3d1b4587..288de0f9 100755 --- a/index.html +++ b/index.html @@ -77,7 +77,6 @@ - diff --git a/winamp.js b/winamp.js index 8ff72891..9fe177a5 100755 --- a/winamp.js +++ b/winamp.js @@ -486,16 +486,14 @@ document.onkeyup = function(e){ } } -volume = anchorArgument('volume', 50); -balance = anchorArgument('volume', 0); -file = anchorArgument('m', 'https://cdn.rawgit.com/captbaritone/llama/master/llama.mp3'); -fileName = anchorArgument('name', "1. DJ Mike Llama - Llama Whippin' Intro (0:05)"); -skinUrl = anchorArgument('skin-url', 'https://cdn.rawgit.com/captbaritone/winamp2-js/master/skins/base-2.91.wsz'); - winamp = new Winamp(); -// XXX These should be moved to a constructor, but I can't figure out how -winamp.setVolume(volume); -winamp.setBalance(balance); +// XXX These should be moved to a constructor +winamp.setVolume(50); +winamp.setBalance(0); + +file = 'https://cdn.rawgit.com/captbaritone/llama/master/llama.mp3'; +fileName = "1. DJ Mike Llama - Llama Whippin' Intro (0:05)"; winamp.loadFromUrl(file, fileName); + winamp.marqueeLoop(); -winamp.skinManager.setSkinByUrl(skinUrl); +winamp.skinManager.setSkinByUrl('https://cdn.rawgit.com/captbaritone/winamp2-js/master/skins/base-2.91.wsz');