- 
                Notifications
    
You must be signed in to change notification settings  - Fork 6
 
Open
Labels
enhancementNew feature or requestNew feature or requesthacktoberfesthacktoberfest labelhacktoberfest labelhacktoberfest-accepted
Description
code-highlight-n-print/tool/ss/app.js
Lines 68 to 76 in 5d0b469
const isValidUrl = urlString=> { var urlPattern = new RegExp('^(https?:\\/\\/)?'+ // validate protocol '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // validate domain name '((\\d{1,3}\\.){3}\\d{1,3}))'+ // validate OR ip (v4) address '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // validate port and path '(\\?[;&a-z\\d%_.~+=-]*)?'+ // validate query string '(\\#[-a-z\\d_]*)?$','i'); // validate fragment locator return !!urlPattern.test(urlString); } - https://github.com/SGI-CAPP-AT2/code-highlight-n-print/blob/main/tool/ss/app.js#L54-L67
 
-  create event listener 
url-validated - dispatch on url validated successfully
 -  while dispatch pass 
ev.isValid:bool -  show 
fetch urlbutton only ifev.isValid:boolistrue 
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfesthacktoberfest labelhacktoberfest labelhacktoberfest-accepted
