Cleaning continues

This commit is contained in:
An Phan 2016-07-11 09:28:15 +08:00
parent f85165a1a1
commit 0bc4e5c3d3
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2
2 changed files with 1 additions and 22 deletions

View file

@ -196,7 +196,7 @@ export default {
},
/**
* Parse song ID from permalink and play.
* Init our basic, custom router on ready to determine app state.
*/
'koel:ready': () => {
router.init();

View file

@ -1,21 +0,0 @@
/**
* URL-related helpers
* @type {Object}
*/
export const url = {
/**
* Parse the song ID from a hash.
*
* @param {string} hash
*
* @return {string|boolean}
*/
parseSongId(hash = null) {
if (!hash) {
hash = window.location.hash;
}
const matches = hash.match(/#!\/song\/([a-f0-9]{32}$)/);
return matches ? matches[1] : false;
},
};