mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-11-11 13:10:38 +00:00
Auto remove the redundant trailing slash when set directory path on VentoyPlugson page.
This commit is contained in:
parent
24b05c0345
commit
598af7f45c
@ -743,10 +743,10 @@
|
||||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||
<!-- jquery validate -->
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=100"></script>
|
||||
|
||||
<script src="/static/js/vtoy.js"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js"></script>
|
||||
<script src="/static/js/vtoy.js?v=100"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=100"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
|
@ -2,6 +2,13 @@
|
||||
function ventoy_replace_slash(str) {
|
||||
var str1 = str.replace(/\\/g, '/');
|
||||
var str2 = str1.replace(/\/\//g, '/');
|
||||
|
||||
if (str2 && str2.length > 0) {
|
||||
if (str2.substr(-1) === "/") {
|
||||
return str2.substr(0, str2.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return str2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user