Created
May 25, 2017 17:09
-
-
Save vitqst/536ecee9f8da3e61bb7872168eff9956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var srcImg = $('#allsizes-photo').children('img').attr('src'); | |
var nowUrl = window.location.href; | |
if(nowUrl.indexOf('sizes/k') > 0){ | |
if(typeof srcImg !== 'undefined'){ | |
openInNewTab(srcImg); | |
} | |
} | |
function openInNewTab(url) { | |
var win = window.open(url, '_blank'); | |
win.focus(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment