File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+
7+ < title > Terms of Service | is-a.dev</ title >
8+
9+ <!-- Stylesheets -->
10+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css ">
11+
12+ <!-- Scripts -->
13+ < script src ="https://cdn.jsdelivr.net/npm/marked/marked.min.js "> </ script >
14+ </ head >
15+
16+ < body >
17+ < div class ="markdown-body " id ="terms-of-service "> </ div >
18+
19+ < script >
20+ const markdownUrl = 'https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/TERMS_OF_SERVICE.md' ;
21+
22+ const container = document . getElementById ( 'terms-of-service' ) ;
23+
24+ // Fetch the Markdown file
25+ fetch ( markdownUrl )
26+ . then ( response => {
27+ if ( ! response . ok ) {
28+ throw new Error ( `Error fetching the file: ${ response . statusText } ` ) ;
29+ }
30+ return response . text ( ) ;
31+ } )
32+ . then ( markdown => {
33+ // Convert Markdown to HTML using Marked.js
34+ const htmlContent = marked . parse ( markdown ) ;
35+
36+ // Insert the HTML into the container
37+ container . innerHTML = htmlContent ;
38+ } )
39+ . catch ( error => {
40+ console . error ( 'Error:' , error ) ;
41+ container . innerHTML = '<p>Failed to load Terms of Service.</p>' ;
42+ } ) ;
43+ </ script >
44+ </ body >
45+ </ html >
You can’t perform that action at this time.
0 commit comments