{"id":19768018,"url":"https://github.com/grvpanchal/loading-scripts","last_synced_at":"2026-03-05T01:03:32.621Z","repository":{"id":70887886,"uuid":"260565669","full_name":"grvpanchal/loading-scripts","owner":"grvpanchal","description":"The repo explain the different way to load script tag containing JavaScript onto you website.","archived":false,"fork":false,"pushed_at":"2025-11-18T16:10:12.000Z","size":52,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-23T01:04:38.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grvpanchal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-01T21:53:43.000Z","updated_at":"2020-05-01T21:55:00.000Z","dependencies_parsed_at":"2023-06-02T19:45:57.834Z","dependency_job_id":null,"html_url":"https://github.com/grvpanchal/loading-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grvpanchal/loading-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grvpanchal%2Floading-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grvpanchal%2Floading-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grvpanchal%2Floading-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grvpanchal%2Floading-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grvpanchal","download_url":"https://codeload.github.com/grvpanchal/loading-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grvpanchal%2Floading-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30104218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T00:38:46.881Z","status":"ssl_error","status_checked_at":"2026-03-05T00:38:45.829Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T04:34:18.188Z","updated_at":"2026-03-05T01:03:32.579Z","avatar_url":"https://github.com/grvpanchal.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ways of loading JavaScript via loading scripts tags\n\n## Description\nThe repo explain the different way to load script tag containing JavaScript onto you website.\n\n## Setup\n\nInstall Packages\n```sh\nnpm install\n```\nStart the server\n```sh\nnpm start\n```\n\nAccess you server via http://localhost:5000\n\n# Information\n\nThis repo demonstrates the 5 ways import JavaScript via `\u003cscript\u003e` tag\n\n1. Normal Script Tag\n```html\n\u003cscript\u003e\n    function createWorld() {\n        const h2Element = document.createElement('h2');\n        h2Element.innerHTML = 'Content loaded via script tag';\n        document.body.appendChild(h2Element);\n    }\n\n    createWorld();\n\u003c/script\u003e\n```\n2. Script Tag with local Resource file\n```html\n\u003cscript src=\"./assets/js/main.js\"\u003e\u003c/script\u003e\n```\n3. Script Tag with External Resource file\n```html\n\u003cscript src=\"//grvpanchal.ml/assets/js/createExternalWorld.js\"\u003e\u003c/script\u003e\n```\n4. Script Tag that dynamically loads a script file\n```html\n\u003cscript\u003e\n    function loadScriptDynamically(src) {\n        const scriptElement = document.createElement('script');\n        scriptElement.src = src;\n        document.head.appendChild(scriptElement);\n    }\n\n    setTimeout(() =\u003e loadScriptDynamically('./assets/js/createDynamicInsertWorld.js'), 3000);\n\u003c/script\u003e\n```\n5. Script Tag that supports ES6 Module Import\n```html\n\u003cscript src=\"assets/js/app.js\" type=\"module\"\u003e\u003c/script\u003e\n```\n\nI hope I have covered all ways. Address bar way not considered. Please let me know if you guys know additional\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrvpanchal%2Floading-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrvpanchal%2Floading-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrvpanchal%2Floading-scripts/lists"}