mirror of
https://github.com/caojiezi2003/Snavigation.git
synced 2024-11-10 06:39:45 +00:00
Merge pull request #11 from kmou424/master
Fix: Support localhost domain and port in url
This commit is contained in:
commit
c2bd259140
@ -1116,7 +1116,7 @@ $(document).ready(function () {
|
|||||||
// 自定义壁纸设置保存
|
// 自定义壁纸设置保存
|
||||||
$(".wallpaper_save").click(function () {
|
$(".wallpaper_save").click(function () {
|
||||||
var url = $("#wallpaper-url").val();
|
var url = $("#wallpaper-url").val();
|
||||||
var reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
|
var reg = /^http(s)?:\/\/(([\w-]+\.)+[\w-]|localhost)+(:[0-9]{1,5})?(\/[\w- ./?%&=]*)?$/g;
|
||||||
if (!reg.test(url)) {
|
if (!reg.test(url)) {
|
||||||
iziToast.show({
|
iziToast.show({
|
||||||
message: '请输入正确的链接',
|
message: '请输入正确的链接',
|
||||||
|
Loading…
Reference in New Issue
Block a user