diff --git a/src/plugins/safari-view-controller.ts b/src/plugins/safari-view-controller.ts index e6c80e9e..0580c16f 100644 --- a/src/plugins/safari-view-controller.ts +++ b/src/plugins/safari-view-controller.ts @@ -1,4 +1,5 @@ -import {Plugin, Cordova} from './plugin'; +import { Cordova, Plugin } from './plugin'; + /** * @name SafariViewController @@ -39,59 +40,60 @@ import {Plugin, Cordova} from './plugin'; * ``` */ @Plugin({ - plugin: 'cordova-plugin-safariviewcontroller', - pluginRef: 'SafariViewController', - platforms: ['iOS', 'Android'], - repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller' + plugin: 'cordova-plugin-safariviewcontroller', + pluginRef: 'SafariViewController', + platforms: ['iOS', 'Android'], + repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller' }) export class SafariViewController { - /** - * Checks if SafariViewController is available - */ - @Cordova() - static isAvailable(): Promise {return; } + /** + * Checks if SafariViewController is available + */ + @Cordova() + static isAvailable(): Promise { return; } - /** - * Shows Safari View Controller - * @param options - */ - @Cordova() - static show(options?: SafariViewControllerOptions): Promise {return; } + /** + * Shows Safari View Controller + * @param options + */ + @Cordova() + static show(options?: SafariViewControllerOptions): Promise { return; } - /** - * Hides Safari View Controller - */ - @Cordova() - static hide(): void {} + /** + * Hides Safari View Controller + */ + @Cordova() + static hide(): void { } - /** - * Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below. - */ - @Cordova() - static connectToService(): Promise {return; } + /** + * Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below. + */ + @Cordova() + static connectToService(): Promise { return; } - /** - * Call this method whenever there's a chance the user will open an external url. - */ - @Cordova() - static warmUp(): Promise {return; } + /** + * Call this method whenever there's a chance the user will open an external url. + */ + @Cordova() + static warmUp(): Promise { return; } + + /** + * For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL. + * @param url + */ + @Cordova() + static mayLaunchUrl(url: string): Promise { return; } - /** - * For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL. - * @param url - */ - @Cordova() - static mayLaunchUrl(url: string): Promise {return; } } export interface SafariViewControllerOptions { - url?: string; - hidden?: boolean; - toolbarColor?: string; - animated?: boolean; - showDefaultShareMenuItem?: boolean; - enterReaderModeIfAvailable?: boolean; - tintColor?: string; - transition?: string; + url?: string; + hidden?: boolean; + toolbarColor?: string; + animated?: boolean; + showDefaultShareMenuItem?: boolean; + enterReaderModeIfAvailable?: boolean; + tintColor?: string; + transition?: string; }