misc.firefox: floor output, inline code it

This commit is contained in:
Cynthia Foxwell 2025-01-08 23:20:39 -07:00
parent af018b7947
commit 13396ee89b

View file

@ -5,8 +5,8 @@ firefox.category = "misc";
firefox.helpText = "Get the approximate latest Firefox user-agent";
firefox.callback = function (msg, line) {
const now = Math.floor(Date.now() / 1000);
const version = 124 + (now - 1710892800) / 2419200;
const version = Math.floor(124 + (now - 1710892800) / 2419200);
return `Mozilla/5.0 (X11; Linux x86_64; rv:${version}.0) Gecko/20100101 Firefox/${version}.0`;
return `\`Mozilla/5.0 (X11; Linux x86_64; rv:${version}.0) Gecko/20100101 Firefox/${version}.0\``;
};
hf.registerCommand(firefox);