mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Cleaning continues
This commit is contained in:
parent
f85165a1a1
commit
0bc4e5c3d3
2 changed files with 1 additions and 22 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue