Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/src/commit/1a63a1b0f495689db6186af06a246fea4026a6e6/generators/gfycat.js You should set ROOT_URL correctly, otherwise the web may not work correctly.
ass/generators/gfycat.js

18 lines
667 B

const fs = require('fs-extra');
const adjectives = fs.readFileSync('./generators/gfycat/adjectives.txt').toString().split('\n');
const animals = fs.readFileSync('./generators/gfycat/animals.txt').toString().split('\n');
const MIN_LENGTH = require('../setup').gfyIdSize;
function getWord(list, delim = '') {
return list[Math.floor(Math.random() * list.length)].concat(delim);
}
function genString(count = MIN_LENGTH) {
let gfycat = '';
for (let i = 0; i < (count < MIN_LENGTH ? MIN_LENGTH : count); i++)
gfycat += getWord(adjectives, '-');
return gfycat.concat(getWord(animals));
};
module.exports = ({ gfyLength }) => genString(gfyLength);