Skip to content

Instantly share code, notes, and snippets.

@dannygarcia
Created April 6, 2016 17:55
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 dannygarcia/9cb88177f3b7d15b3e6a5f83d8e5c48e to your computer and use it in GitHub Desktop.
Save dannygarcia/9cb88177f3b7d15b3e6a5f83d8e5c48e to your computer and use it in GitHub Desktop.
javascript:(function()%7Bvar%20r%20%3D%20%2F%5E.*(%3F%3Avimeo%5C.com%5C%2F(%5Cw%7B8%7D)%7C(%3F%3Ayoutu.be%5C%2F%7Cv%5C%2F%7Cu%5C%2F%5Cw%5C%2F%7Cembed%5C%2F%7Cv%3D)(%5B%5E%23%5C%26%5C%3F%20%5D*)).*%2Fgi%2C%20m%20%3D%20r.exec(window.location.href)%3B%20if%20(m%5B1%5D)%20%7B%20window.open(%22http%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F%22%2Bm%5B1%5D)%3B%20%7D%20else%20if%20(m%5B2%5D)%20%7B%20window.open(%22http%3A%2F%2Fwww.youtube.com%2Fwatch_popup%2F%3Fv%3D%22%2Bm%5B2%5D%2C%20%22_blank%22%2C%20%22height%3D345%2Cwidth%3D560%22)%3B%20%7D%7D)()
@niucang
Copy link

niucang commented Nov 7, 2017

hi~, can you give some example? I don't know how to use it.thank you ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment