Skip to content

Commit

Permalink
Merge pull request #11 from kmou424/master
Browse files Browse the repository at this point in the history
Fix: Support localhost domain and port in url
  • Loading branch information
imsyy authored Sep 1, 2022
2 parents a9110e9 + 1b69dce commit c2bd259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ $(document).ready(function () {
// 自定义壁纸设置保存
$(".wallpaper_save").click(function () {
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)) {
iziToast.show({
message: '请输入正确的链接',
Expand Down

2 comments on commit c2bd259

@vercel
Copy link

@vercel vercel bot commented on c2bd259 Sep 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

snavigation – ./

snavigation.vercel.app
snavigation-imsyy.vercel.app
snavigation-git-master-imsyy.vercel.app

@4everland
Copy link

@4everland 4everland bot commented on c2bd259 Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.