mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-12 11:30:01 -04:00
14 lines
No EOL
347 B
JavaScript
14 lines
No EOL
347 B
JavaScript
function address(arr = []) {
|
|
return function (ctx) {
|
|
ctx.address = arr[Math.floor(Math.random() * arr.length)];
|
|
};
|
|
};
|
|
|
|
function blacklist(arr = [], page = '') {
|
|
return function (ctx) {
|
|
if (arr.includes(ctx.url.hostname)) ctx.clientResponse.end(page);
|
|
};
|
|
};
|
|
|
|
exports.address = address;
|
|
exports.blacklist = blacklist; |