Web HTML Universal Music Player
License
justinfrankel/WHUMP
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
WHUMP v0.x Web HTML Universal Music Player Copyright (C) 2015 Cockos Inc License: GPL To use, option 1: Make a file whump_config.js and put it with whump.html: // can override pl_fntitle, db_fntitle, or fntourl() definitions function whump_init() { document.title = "test"; document.getElementById("thdr").innerHTML = "WHUMP-test"; document.getElementById("foot").innerHTML = "Powered by WHUMP"; request_db("database-file.txt"); // can include multiple lines of these if you like }; To use, option 2: (if you want search-engines getting your page and don't want the additional javascript file) Search and replace, e.g. in PHP: $init_code = 'request_db("database-file.txt");' // can include multiple statements echo str_replace('<title>WHUMP</title>','<title>test</title>', str_replace('<div id="thdr"></div>', '<div id="thdr">WHUMP-test</div>', str_replace('<script src="whump_config.js"></script>','', str_replace('<div id="foot"></div>', '<div id="foot">Powered by WHUMP</div>', str_replace('whump_init();', $init_code, file_get_contents("whump.html")))))); -------- database-file.txt can be a URL, and the contents of which should be zero or more lines of (tab delimited): ; Prepopulated playlist item: pre URL ; Item in database: item URL length_in_seconds -------- BONUS: want to modify the CSS without having to modify the .html file? Use the following javascript: function getcssrule(name) { if (!document.styleSheets) return false; var ss=document.styleSheets[0],c=0; for (;;) { for (var i = 0; i < ss.cssRules.length; i ++) { var r = ss.cssRules ? ss.cssRules[i] : ss.rules[i]; if (r && r.selectorText.toLowerCase()==name) return r; } if (c++) return false; if (ss.addRule) ss.addRule(name, null,0); else ss.insertRule(name+" { }", 0); } } Example: getcssrule("#foot a").style.color = "black";
About
Web HTML Universal Music Player
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published