# tableberg/1.1.5/src/pro-status.ts

Tableberg – Simple Gutenberg Table Block, version 1.1.5. 41 lines.

- Page: https://pluginprobe.com/plugins/tableberg/1.1.5/code/src/pro-status.ts
- Raw: https://pluginprobe.com/plugins/tableberg/1.1.5/raw/src/pro-status.ts
- Modified: 2026-09-16T03:30:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/1.1.5/code/src/pro-status.ts#L10-L20`.

```typescript
type TablebergConfig = {
    plugin_url?: string;
    IS_PRO?: boolean;
};

export function getTablebergConfig(): TablebergConfig {
    if (typeof globalThis !== "undefined") {
        const globalConfig = (
            globalThis as typeof globalThis & {
                TABLEBERG_CFG?: TablebergConfig;
            }
        ).TABLEBERG_CFG;

        if (globalConfig) {
            return globalConfig;
        }
    }

    if (typeof window !== "undefined") {
        try {
            const parentConfig = (
                window.parent as Window & {
                    TABLEBERG_CFG?: TablebergConfig;
                }
            )?.TABLEBERG_CFG;

            if (parentConfig) {
                return parentConfig;
            }
        } catch {
            // Cross-frame access can fail; fall back to defaults.
        }
    }

    return {};
}

export function isProAvailable() {
    return Boolean(getTablebergConfig().IS_PRO);
}

```
