Hosting JavaScript file on Google Drive

Hosting JavaScript file on Google Drive

1.Upload your JavaScript file on Google-Drive

2.Get Sharable link

3.Get file id from the link

"https://drive.google.com/file/d/1yCEcbHGmfmHFOYQkqEB4CmjJWqiJAkQG/view?usp=sharing"

id="1yCEcbHGmfmHFOYQkqEB4CmjJWqiJAkQG"

4.Now use this id in another below URL

"https://drive.google.com/uc?export=view&id="

Add File id in Url

"https://drive.google.com/uc?export=view&id=1yCEcbHGmfmHFOYQkqEB4CmjJWqiJAkQG"

5.Add this URL in the script tag using the src attribute

<script language="text/javascript" src="https://drive.google.com/uc?export=view&id=1yCEcbHGmfmHFOYQkqEB4CmjJWqiJAkQG"></script>

6.Add this Script tag in or tag of your HTML document

Done. You Successfully Hosted your JavaScript File on Google Drive.