Getting a Remote JS file is not allowed in add-ons on Mozilla add-ons.
You can create a plain DB file and get it remotely but that would take a fair amount of time which will stop the extension working. In fact. it is not better than having the files internally.
I am familiar with your add-on. The best way is to create a text file just for the patterns, then read them on start up and create an array from them. Then use a single webRequest.onBeforeRequest.addListener
for all of them.
There are many ways to optimise the code.
An example would be to create patterns and pass them directly to webRequest.onBeforeRequest.addListener
Example:
// a separate file for the patterns
pat1
pat2
pat3
// Get the file, read it into text⌠create an array
let pattern = fileText.split(/[\r\n]'/);
Now you have an array of patterns that you can pass to webRequest.onBeforeRequest.addListener
Note they must be patterns which makes it easier
you can use this: *://*.bongacams.xxx/*
Instead of all these:
"mk.bongacams.xxx": false,
"it.bongacams.xxx": false,
"hr.bongacams.xxx": false,
"ro.bongacams.xxx": false,
"sk.bongacams.xxx": false,
"hu.bongacams.xxx": false,
"gr.bongacams.xxx": false,
...
...
Then the listener
browser.webRequest.onBeforeRequest.addListener(
cancel,
{urls: [pattern],
['blocking']
);