Skip to content

Commit

Permalink
remove requirements of av.min.js and jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
DesertsP committed Oct 7, 2020
1 parent aa20afc commit c64d8af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
![](./src/images/logo.opacity.png)
# Valine
[![version](https://img.shields.io/github/release/xCss/Valine.svg?style=flat-square)](https://github.com/xCss/Valine/releases) [![npm downloads](https://img.shields.io/npm/dt/valine.svg?style=flat-square)](https://www.npmjs.com/package/valine) [![build](https://img.shields.io/circleci/project/github/xCss/Valine/master.svg?style=flat-square)](https://circleci.com/gh/xCss/Valine) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat-square)](#donate)

> A simple comment system based on Leancloud.
------------------------------
**[Live Demo](https://panjunwen.github.io/Valine/)**

[中文教程](https://deserts.io/diy-a-comment-system/)

Expand All @@ -27,21 +27,17 @@
```html
<script src="./dist/Valine.min.js"></script>
```
or
```html
<script src="https://panjunwen.github.io/Valine/dist/Valine.min.js"></script>
```
**2. Get `App ID`/`App Key` from LeanCloud**
[Click here](https://leancloud.cn/dashboard/login.html#/signup) to register or login in `LeanCloud`.
[Click here](https://leancloud.cn/dashboard/applist.html#/newapp) Create new application in `LeanCloud`, and you will get `appId`/`appKey`.

**3. Transfer Your Data**

[Disqus2LeanCloud](http://disqus.panjunwen.com/)
[Disqus2LeanCloud](https://github.com/DesertsP/disqus2valine)

**4. Administration**

[Valine Admin](https://github.com/panjunwen/Valine-Admin)
[Valine Admin](https://github.com/DesertsP/Valine-Admin)

## Usage
```html
Expand All @@ -59,7 +55,6 @@ or
<div class="comment"></div>
<script>
new Valine({
av: AV,
el: '#disqus_thread',
smiles_url: '/smiles',
app_id: 'Your App ID',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valine",
"version": "1.2.1",
"version": "1.2.2",
"description": "A simple comment system based on Leancloud.",
"main": "/src/Valine.js",
"author": {
Expand Down Expand Up @@ -52,6 +52,7 @@
"dependencies": {
"babel": "^6.23.0",
"blueimp-md5": "^2.8.0",
"leancloud-storage": "^4.6.1",
"marked": "^0.6.1",
"source-map": "^0.5.6",
"string-format": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/Valine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var md = require('marked');
var xss = require('xss');
var crypto = require('blueimp-md5');
const format = require('string-format');
const AV = require('leancloud-storage');

var GRAVATAR_BASE_URL = 'https://gravatar.loli.net/avatar/';
var DEFAULT_EMAIL_HASH = '9e63c80900d106cbbec5a9f4ea433a3e';
Expand Down

0 comments on commit c64d8af

Please sign in to comment.