{"id":26667320,"url":"https://github.com/sandersade/jquery.viewsource","last_synced_at":"2026-05-04T04:31:22.795Z","repository":{"id":70126173,"uuid":"93378790","full_name":"SanderSade/jQuery.viewSource","owner":"SanderSade","description":"jQuery plugin to display HTML source of a page - or a section of a page","archived":false,"fork":false,"pushed_at":"2017-06-05T07:55:36.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T19:46:40.442Z","etag":null,"topics":["html-source","jquery","jquery-plugin","viewsource"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SanderSade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-06-05T07:48:26.000Z","updated_at":"2017-08-07T09:43:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"783413b3-4f1a-4688-bb0a-804114406471","html_url":"https://github.com/SanderSade/jQuery.viewSource","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SanderSade/jQuery.viewSource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderSade%2FjQuery.viewSource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderSade%2FjQuery.viewSource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderSade%2FjQuery.viewSource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderSade%2FjQuery.viewSource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SanderSade","download_url":"https://codeload.github.com/SanderSade/jQuery.viewSource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderSade%2FjQuery.viewSource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32595043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["html-source","jquery","jquery-plugin","viewsource"],"created_at":"2025-03-25T19:36:59.133Z","updated_at":"2026-05-04T04:31:22.780Z","avatar_url":"https://github.com/SanderSade.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# viewSource jQuery plugin\r\n\r\n![screenshot](http://dukelupus.com/images/jQuery.viewSource.png)\r\n\r\n## Purpose\r\nShow the source of the current web page or a part of it in its current state. Useful in HTML/JS/CSS demonstration pages, allowing users to easily see your HTML source.\r\n\r\nOptional support for the google-code-prettify (http://code.google.com/p/google-code-prettify/) script - you must include prettify.css and prettify.js to your web page.\r\n\r\nIncludes HTMLEncode (Copyright (c) 2006-2010 Thomas Peri, http://www.tumuski.com/) \r\n\r\n## Use\r\nInclude the script to your web page: `\u003cscript type=\"text/javascript\" src=\"jQuery.viewSource.min.js\"\u003e\u003c/script\u003e`. See the [included example](https://github.com/SanderSade/jQuery.viewSource/tree/master/example).\r\n\r\nTwo methods:\r\n1. Add $(someselector).viewSource(code-to-show-selector); to document.ready. This will bind onclick event to the element(s) specified by your selector - i.e. clicking on those elements will show the source.\r\n2. Call $().showSource(code-to-show-selector); yourself to immediately show the source.\r\n\r\nNote: \"code-to-show-selector\" is optional selector for the element which code to show. If left empty or passed an empty string, it will default to \"html\", ie. whole page.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandersade%2Fjquery.viewsource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandersade%2Fjquery.viewsource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandersade%2Fjquery.viewsource/lists"}