Finally finished giant ES6 refactor
This commit is contained in:
parent
c6d48cc424
commit
03e2666958
39 changed files with 553 additions and 635 deletions
|
@ -1,14 +1,11 @@
|
|||
"use strict";
|
||||
var parse = require('url').parse;
|
||||
|
||||
module.exports.match = function(url, type) {
|
||||
var parsed = parse(url);
|
||||
import { parse } from 'url';
|
||||
|
||||
export function* match(url, type) {
|
||||
const parsed = parse(url);
|
||||
if (!parsed.host.match(/music.xbox.com$/)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var parts = parsed.path.split("/");
|
||||
|
||||
const parts = parsed.path.split("/");
|
||||
return (parts[1] == "album" || parts[1] == "track") && parts[4];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue