Skip to content

Instantly share code, notes, and snippets.

@AshikNesin
Created June 15, 2017 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshikNesin/8fb2c71bc441aa723d8ebc6e98650b4b to your computer and use it in GitHub Desktop.
Save AshikNesin/8fb2c71bc441aa723d8ebc6e98650b4b to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
<script src="https://unpkg.com/closest-link@0.1.0/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
</body>
</html>
// const YOUTUBE_SINGLE_VIDEO_REGEX = /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?/
// const WEB_LINK_REGEX = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})/
// // const isYouTubeSingleVideo = (url) => YOUTUBE_SINGLE_VIDEO_REGEX.test(url || window.location.href);
// // console.log(isYouTubeSingleVideo())
// console.log(WEB_LINK_REGEX.test('https//ashiknesin.com'))
// console.log(findClosestLink)
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
// const YOUTUBE_SINGLE_VIDEO_REGEX = /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?/
// const WEB_LINK_REGEX = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})/
// // const isYouTubeSingleVideo = (url) => YOUTUBE_SINGLE_VIDEO_REGEX.test(url || window.location.href);
// // console.log(isYouTubeSingleVideo())
// console.log(WEB_LINK_REGEX.test('https//ashiknesin.com'))
// console.log(findClosestLink)
"use strict";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment