mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
Remove anchor stuff and update readme
This commit is contained in:
parent
575fa7858c
commit
2f6717bd76
4 changed files with 8 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
14
anchor.js
14
anchor.js
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -77,7 +77,6 @@
|
|||
<script src="media.js"></script>
|
||||
<script src="skin.js"></script>
|
||||
<script src="font.js"></script>
|
||||
<script src="anchor.js"></script>
|
||||
<script src="winamp.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
18
winamp.js
18
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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue