Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lightapis/userscript-with-webdav
- Owner: LightAPIs
- License: mit
- Created: 2023-10-03T09:11:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-03T13:24:15.000Z (about 1 year ago)
- Last Synced: 2024-10-14T01:20:11.643Z (about 1 month ago)
- Topics: tampermonkey, userscript, violentmonkey, webdav
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/userscript-with-webdav
- Size: 30.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)