fix(修复github错误仓储地址导致最后tar包只有10k的bug)

This commit is contained in:
浪子小新
2020-04-10 21:29:23 +08:00
parent b2617a7e04
commit 8ac3a2c8f2
3 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -36,6 +36,6 @@
<div class="copy-right">
<p>Copyright &copy; 2019-<script>document.write((new Date).getFullYear())</script>&nbsp;<a href="http://www.widora.cn/" title="widora" class="widora" target="_blank">歪朵拉</a> &nbsp;|&nbsp; Designed by xiaoxin&nbsp; |&nbsp;<a href="https://github.com/xiaoxinda/github-proxy" title="source" class="widora" target="_blank">获取source</a>&nbsp;|&nbsp; <a href="javascript;" title="copyright" class="widora exemption">免责声明</a> &nbsp;|&nbsp; 更新日志 </p>
</div>
<script src="/js/index.js" type="application/javascript"></script>
<script src="/js/index.js?v2.0" type="application/javascript"></script>
</body>
</html>
+2 -1
View File
@@ -47,6 +47,7 @@ var webSocketClick = {
var data = JSON.parse(event.data)
if (data.status == 1) {
layer.msg(data.msg);
setTimeout(function(){window.location.reload();},3000)
return false;
}
switch (data.data.sta) {
@@ -95,7 +96,7 @@ var webSocketClick = {
var __this = this;
var githubUrl = __this.app_block.find(".text");
var githubUrlReg = new RegExp('^https:\\/\\/github.com\\/([\\w\\/\\d\\-\\_\\.]+)$','ig');
var githubUrlReg1 = new RegExp('^((https|http):\\/\\/)?([\\w\\.\\/\\-\\_^]+?)\\.([tar\\.gz|gz|tar\\.bz2|bz2|tar|zip|tar\\.xz|tar\\.z|rpm|deb|rar]+?)$','ig');
var githubUrlReg1 = new RegExp('^((https|http):\\/\\/)?([\\w\\.\\/\\-\\_^]+?)\\.([tar\\.gz|gz|tar\\.bz2|bz2|tar|zip|tar\\.xz|tar\\.z|rpm|deb|rar|apk|exe]+?)$','ig');
if(!githubUrl.val()){
layer.msg("请输入github地址");
githubUrl.select();