Mls Utilities

I try to factorize common function in my utilities:

  • mls.getmeetingTitle(): Extracts meeting title from page URL.
  • mls.embedUrl(url, w, h): Embeds a URL using an iframe (width & height optional).
  • mls.debug(message, prefix): Prints debug message (if LOG_ENABLE is true).
  • mls.getCodeBlock(page, blockId, token, text): Retrieves code from a Markdown code block by ID, with optional token replacement.
  • mls.parseISODate(isoDate): Parses an ISO date string to a timestamp (potential error with xoffset).
  • mls.getStdlibInternal(): Gets a list of internal API keys (cached).
  • mls.positionToLineColumn(text, pos): Converts a text position to line/column numbers.
  • table.appendArray(a, b): Appends array b to array a.
  • table.unique(array): Returns unique elements from an array.
  • table.uniqueKVBy(array, keyFn): Returns unique key-value pairs based on a key function.
  • table.mergeKV(t1, t2): Merges two tables (recursive for nested tables).
  • table.map(t, fn): Applies a function to each element of an array.
  • table.toMd(data): Converts a table (or JSON) to a Markdown table.

Script to install:

1 Like

Ngl, thought this was about message layer security at first :joy: