Skip to content

Commit

Permalink
update donate link
Browse files Browse the repository at this point in the history
  • Loading branch information
sorayuki committed Feb 16, 2021
1 parent 2eb2139 commit 24764f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 113 deletions.
23 changes: 20 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# [See Readme](https://sorayuki.github.io/obs-multi-rtmp)

# [Homepage / 主页](https://sorayuki.github.io/obs-multi-rtmp)

# 声明

Expand All @@ -21,4 +20,22 @@ Recently an Baidu Tieba account 'maggot' is selling this plugin. Don't buy it.

このプラグインは無料ソフトです。

最近百度Tiebaで有料でこのソフトを提供する人があります。注意してください。
最近百度Tiebaで有料でこのソフトを提供する人があります。注意してください。


# Donate

如果你觉得这个工具很有用想要捐赠,这里是链接。注意:这不是提需求的渠道。

このツールに投げ銭したいならここはリンクです。(機能要求ではありません)

If you regard this tool useful and want to doante for some, here is the link. (It's not for feature request.)

## [paypal / 贝宝](https://paypal.me/sorayuki0)

## alipay / 支付宝

![alipay](./docs/zhi.png)

## wechat / 微信
![wechat](./docs/wechat.jpg)
112 changes: 2 additions & 110 deletions docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ A: このプラグインは OBS 本体のエンコーダーと共有している
3. Compile


# 捐赠 / 投げ銭 / donate
# Donate

如果你觉得这个工具很有用想要捐赠,这里是链接。注意:这不是提需求的渠道。

Expand All @@ -84,115 +84,7 @@ A: このプラグインは OBS 本体のエンコーダーと共有している
If you regard this tool useful and want to doante for some, here is the link. (It's not for feature request.)

## paypal / 贝宝
<div id="smart-button-container">
<div style="text-align: center"><label for="description">text </label><input type="text" name="descriptionInput" id="description" maxlength="127" value=""></div>
<p id="descriptionError" style="visibility: hidden; color:red; text-align: center;">Please enter a description</p>
<div style="text-align: center"><label for="amount">super chat </label><input name="amountInput" type="number" id="amount" value="" ><span> USD</span></div>
<p id="priceLabelError" style="visibility: hidden; color:red; text-align: center;">Please enter a price</p>
<div id="invoiceidDiv" style="text-align: center; display: none;"><label for="invoiceid"> </label><input name="invoiceid" maxlength="127" type="text" id="invoiceid" value="" ></div>
<p id="invoiceidError" style="visibility: hidden; color:red; text-align: center;">Please enter an Invoice ID</p>
<div style="text-align: center; margin-top: 0.625rem;" id="paypal-button-container"></div>
</div>
<script src="https://www.paypal.com/sdk/js?client-id=sb&currency=USD" data-sdk-integration-source="button-factory"></script>
<script>
function initPayPalButton() {
var description = document.querySelector('#smart-button-container #description');
var amount = document.querySelector('#smart-button-container #amount');
var descriptionError = document.querySelector('#smart-button-container #descriptionError');
var priceError = document.querySelector('#smart-button-container #priceLabelError');
var invoiceid = document.querySelector('#smart-button-container #invoiceid');
var invoiceidError = document.querySelector('#smart-button-container #invoiceidError');
var invoiceidDiv = document.querySelector('#smart-button-container #invoiceidDiv');

var elArr = [description, amount];

if (invoiceidDiv.firstChild.innerHTML.length > 1) {
invoiceidDiv.style.display = "block";
}

var purchase_units = [];
purchase_units[0] = {};
purchase_units[0].amount = {};

function validate(event) {
return event.value.length > 0;
}

paypal.Buttons({
style: {
color: 'gold',
shape: 'pill',
label: 'paypal',
layout: 'horizontal',

},

onInit: function (data, actions) {
actions.disable();

if(invoiceidDiv.style.display === "block") {
elArr.push(invoiceid);
}

elArr.forEach(function (item) {
item.addEventListener('keyup', function (event) {
var result = elArr.every(validate);
if (result) {
actions.enable();
} else {
actions.disable();
}
});
});
},

onClick: function () {
if (description.value.length < 1) {
descriptionError.style.visibility = "visible";
} else {
descriptionError.style.visibility = "hidden";
}

if (amount.value.length < 1) {
priceError.style.visibility = "visible";
} else {
priceError.style.visibility = "hidden";
}

if (invoiceid.value.length < 1 && invoiceidDiv.style.display === "block") {
invoiceidError.style.visibility = "visible";
} else {
invoiceidError.style.visibility = "hidden";
}

purchase_units[0].description = description.value;
purchase_units[0].amount.value = amount.value;

if(invoiceid.value !== '') {
purchase_units[0].invoice_id = invoiceid.value;
}
},

createOrder: function (data, actions) {
return actions.order.create({
purchase_units: purchase_units,
});
},

onApprove: function (data, actions) {
return actions.order.capture().then(function (details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
},

onError: function (err) {
console.log(err);
}
}).render('#paypal-button-container');
}
initPayPalButton();
</script>

[paypal / 贝宝](https://paypal.me/sorayuki0)

## alipay or wechat / 支付宝或微信

Expand Down

0 comments on commit 24764f6

Please sign in to comment.