Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lightapis/userscript-with-webdav

Connect WebDAV in the Tampermonkey/Violentmonkey script
https://github.com/lightapis/userscript-with-webdav

tampermonkey userscript violentmonkey webdav

Last synced: about 1 month ago
JSON representation

Connect WebDAV in the Tampermonkey/Violentmonkey script

Awesome Lists containing this project

README

        

# userscript-with-webdav

Connect WebDAV in the Tampermonkey/Violentmonkey script.

## Installation

in userscript:

```jsvascript
// @require https://cdn.jsdelivr.net/npm/userscript-with-webdav@latest/index.iife.js
// @grant GM_xmlhttpRequest
// @connect *
```

or embed:

```shell
npm install userscript-with-webdav
```

## Usage

When embed:

```javascript
import Webdav from 'userscript-with-webdav';
```

## Type

```typescript
class Webdav {
/**
* Constructor
* @param domainURL WebDAV domain
* @param user User name
* @param password User password
*/
constructor(domainURL?: string, user?: string, password?: string);
/**
* Update Config
* @param domainURL WebDAV domain
* @param user User name
* @param password User password
*/
updateConfig(domainURL: string, user: string, password: string): void;
/**
* Download file content
* @param fileURL Relative file URL
* @returns Response
*/
download(fileURL: string): Promise<{
status: number;
data: string;
}>;
/**
* Upload file content
* @param fileURL Relative file URL
* @param data Data
* @returns Response
*/
upload(
fileURL: string,
data: string
): Promise<{
status: number;
data: any;
}>;
}
```

## License

[MIT](./LICENSE)