Created
June 8, 2015 17:40
-
-
Save demux/4d4ce440d7c379305a9a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(function(){ | |
var url = $("script[src$='findfilehosttest.js']").attr('src') | |
var matches = url.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i) | |
var domain = matches && matches[1] | |
alert(domain) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment