constants.ts 862 B

1234567891011121314151617181920212223
  1. import { LogLevel } from "./types";
  2. /** The branch to use in the @icon, @downloadURL and @updateURL directives */
  3. export const branch = "develop";
  4. // export const branch = "main";
  5. /**
  6. * How much info should be logged to the devtools console?
  7. * 0 = Debug (show everything) or 1 = Info (show only important stuff)
  8. */
  9. export const logLevel: LogLevel = 0;
  10. /** Specifies the hard limit for repetitive tasks */
  11. export const triesLimit = 50;
  12. /** Specifies the interval in ms for repetitive tasks */
  13. export const triesInterval = 200;
  14. /** Info about the userscript, parsed from the userscript header (tools/post-build.js) */
  15. export const scriptInfo = Object.freeze({
  16. name: GM.info.script.name,
  17. version: GM.info.script.version,
  18. namespace: GM.info.script.namespace,
  19. lastCommit: "{{BUILD_NUMBER}}" as string, // assert as generic string instead of union
  20. });