Created
          February 23, 2015 08:45 
        
      - 
      
 - 
        
Save nkgokul/465e8b96182aac186be6 to your computer and use it in GitHub Desktop.  
    Generate a link to SimplyTest.me from DrupalXray.com
  
        
  
    
      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
    
  
  
    
  | var generateString = "http://simplytest.me/project/drupal/"; | |
| var drupalVersionString = jQuery(".xray-site div.xray-site-info:nth-child(3)").text(); | |
| var drupalVersion = drupalVersionString.split(": ").pop(); | |
| generateString += drupalVersion + "?"; | |
| jQuery(".xray-site-modules ul li a").each( | |
| function(){ | |
| var url = jQuery(this).attr("href"); | |
| var lastPart = url.split("/").pop(); | |
| generateString += "add[]=" + lastPart + "&"; | |
| } | |
| ); | |
| console.log(generateString); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment