This repository was archived by the owner on Oct 11, 2020. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE html>  
22< html > 
33< head > 
4+     < meta  charset ="UTF-8 "> 
5+     < meta  name ="description " content ="Simple website for pretty printing JSON responses. "> 
6+     < meta  name ="author " content ="Herman Zvonimir Došilović "> 
7+     < meta  name ="viewport " content ="width=device-width, initial-scale=1.0 "> 
8+ 
49    < script  src ="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js " integrity ="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo= " crossorigin ="anonymous "> </ script > 
10+ 
511    < title > JSON Pretty Print</ title > 
12+ 
613    < style > 
714        # content  {
815            font-family :  'Courier New' ,  Courier,  monospace;
1623        var  $content  =  $ ( "#content" ) ; 
1724        var  url  =  location . search . substr ( 1 ) . trim ( ) ; 
1825        if  ( url  ===  "" )  { 
19-             $content . html ( "<p style=\"color: red;\">Please provide URL.</p> Example: https://jsonpp.judge0.com?<strong>https://api.judge0.com/languages</strong>" ) ; 
26+             $content . html ( "\ 
27+ <p style=\"color: red;\">Please provide URL.</p>\ 
28+ <p>Example: https://jsonpp.judge0.com?<strong>https://api.judge0.com/languages</strong></p>\ 
29+ <small>Source code available on <a href=\"https://github.com/judge0/jsonpp\">GitHub</a>.</small>\ 
30+ " ) ; 
2031        } 
2132        else  { 
2233            $ . ajax ( { 
2738                        $content . html ( JSON . stringify ( data ,  null ,  4 ) ) ; 
2839                    } 
2940                    else  { 
30-                         $content . html ( "<p style=\"color: red;\" >Response is not a JSON.</p>" ) ; 
41+                         $content . html ( "<p>Response is not a JSON.</p>" ) ; 
3142                    } 
3243                } , 
3344                error : function ( jqXHR ,  textStatus ,  errorThrown )  { 
34-                     $content . html ( JSON . stringify ( jqXHR ,   null ,   4 ) ) ; 
45+                     $content . html ( `<p> ${ jqXHR . status } </p>` ) ; 
3546                } 
3647            } ) ; 
3748        } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments