Skip to content

Commit

Permalink
fixed an issue where some channels names could not be extracted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonHeidelbach committed Dec 12, 2020
1 parent b77e4d0 commit 92bab15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion JS/cnt.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function twitchAdBlock(){

function twitchUrlObj(url){
let blockedTWKeywords = ['directory','create'];
let twitchUrlPattern = new RegExp(/.*\/\/(www\.)?(twitch\.tv)\/(?<content_type>[a-zA-Z0-9]+)(?:\/)?(?<video_id>[0-9]+)?(?=\/)?/, 'gmi');
let twitchUrlPattern = new RegExp(/.*\/\/(www\.)?(twitch\.tv)\/(?<content_type>[a-zA-Z0-9\$\-\_\.\+\!\*'\(\)\,]+)(?:\/)?(?<video_id>[0-9]+)?(?=\/)?/, 'gmi');
let urlObj = twitchUrlPattern.exec(url)?.groups;
let urlReturnObj = {};
if (urlObj === null || blockedTWKeywords.includes(urlObj?.content_type)) return false;
Expand Down

0 comments on commit 92bab15

Please sign in to comment.