hide anything that contain "porn" in the url

This commit is contained in:
loicbersier 2020-11-26 17:24:30 +01:00
parent 9dff68bc7f
commit e9d68a43a6

View file

@ -118,6 +118,10 @@ class DownloadController {
return view.render(page, viewOption); return view.render(page, viewOption);
} }
if (data.url.toLowerCase().includes("porn")) {
data.feed = "on";
}
let videoID; let videoID;
if (data.sponsorBlock) { if (data.sponsorBlock) {
let regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/; let regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;