UNPKG

mwoffliner

Version:
23 lines (22 loc) 963 B
/** * Check if a given article title or id is main page of the target ZIM */ export declare function isMainPage(articleTitleOrId: string): boolean; /** * Check if a given article title or id is a subpage or not * * A given is a subpage if subpages are activated on its namespace and it contains a / in its title/id */ export declare function isSubpage(articleTitleOrId: string): boolean; /** * For a given namespace number, get the namespace name */ export declare function getNamespaceName(namespace: number): string; /** * Extract the CSS class to apply on article <body> tag from its headHtml, typically returned by MW API call when fetching article content */ export declare function extractBodyCssClass(headHtml: string): string; /** * Extract the CSS class to apply on article <html> tag from its headHtml, typically returned by MW API call when fetching article content */ export declare function extractHtmlCssClass(headHtml: string): string;