From 81a88d13f63d2934049d949c26c163710d2970e8 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 13 Sep 2021 13:18:59 -0500 Subject: [PATCH] Removed user-agent - broken --- src/@ionic-native/plugins/user-agent/index.ts | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/@ionic-native/plugins/user-agent/index.ts diff --git a/src/@ionic-native/plugins/user-agent/index.ts b/src/@ionic-native/plugins/user-agent/index.ts deleted file mode 100644 index 01eda1aa3..000000000 --- a/src/@ionic-native/plugins/user-agent/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; - -/** - * @name User Agent - * @description - * The UserAgent plugin provides functions to set the HTTP user-agent header. For more info about User-Agents, please [see the HTTP User-Agent docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent). - * - * Requires Cordova plugin: `cordova-useragent`. For more info, please see the [User-Agent plugin docs](https://github.com/LouisT/cordova-useragent). - * - * @usage - * ```typescript - * import { UserAgent } from '@ionic-native/user-agent/ngx'; - * - * - * constructor(private userAgent: UserAgent) { } - * - * ... - * - * - * this.userAgent.set('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36') - * .then((res: any) => console.log(res)) - * .catch((error: any) => console.error(error)); - * - * * this.userAgent.get() - * .then((res: any) => console.log(res)) - * .catch((error: any) => console.error(error)); - * - * * this.userAgent.reset() - * .then((res: any) => console.log(res)) - * .catch((error: any) => console.error(error)); - * - * ``` - */ -@Plugin({ - pluginName: 'UserAgent', - plugin: 'cordova-plugin-useragent', - pluginRef: 'UserAgent', - repo: 'https://github.com/danielsogl/cordova-plugin-useragent', - platforms: ['Android', 'iOS'], -}) -@Injectable() -export class UserAgent extends IonicNativePlugin { - /** - * Changes the current user-agent to the one sent by argument. - * @param userAgent {string} User-Agent - * @return {Promise} Returns a promise that resolves when the user-agent changes - */ - @Cordova() - set(userAgent: string): Promise { - return; - } - - /** - * Returns the current user-agent string. - * @return {Promise} Returns a promise that resolves when the user-agent is returned - */ - @Cordova() - get(): Promise { - return; - } - - /** - * Sets the user-agent back to default - * @return {Promise} Returns a promise that resolves when the user-agent resets - */ - @Cordova() - reset(): Promise { - return; - } -}