Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghembedder

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghembedder - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

package.json
{
"name": "ghembedder",
"description": "Embed any source file (or specific lines) from any public github repo in your page, with no server-side dependencies.",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/kirbysayshi/ghembedder",
"author": "Andrew Petersen <senofpeter@gmail.com>",
"main": "src/ghembedder.js",
"repository": {

@@ -8,0 +9,0 @@ "type": "git",

@@ -19,3 +19,3 @@ # ghembedder

// somewhere after/during DOMReady
ghe.autoload(); // requires browser to have EITHER document.querySelectorAll OR jquery
ghembedder.autoload(); // requires browser to have EITHER document.querySelectorAll OR jquery

@@ -25,3 +25,3 @@ // OR

// single specific instance (after page load, for example)
ghe.load( document.querySelectorAll('div')[0] );
ghembedder.load( document.querySelectorAll('div')[0] );

@@ -32,11 +32,11 @@ This will load lines 743-768 of src/core.js (jQuery.proxy) from the jquery repo!

See [http://jsbin.com/ekises/latest](http://jsbin.com/ekises/latest) for a live working demo.
See [http://jsbin.com/suyela](http://jsbin.com/suyela) for a live working demo.
## Documentation
### ghe.autoload()
### ghembedder.autoload()
Find, read, and load all DOM nodes that have a `[gh-path]` attribute. Requires `document.querySelectorAll` or `jQuery`.
### ghe.load( cfg || DOMNode )
Given a DOM node, load a Github file. The DOM node requires a few `data-*` attributes, which are defined in the examples below. Internally, `ghe` turns the node into the following configuration object, which can also be passed to this method:
### ghembedder.load( cfg || DOMNode )
Given a DOM node, load a Github file. The DOM node requires a few `data-*` attributes, which are defined in the examples below. Internally, `ghembedder` turns the node into the following configuration object, which can also be passed to this method:

@@ -43,0 +43,0 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc