diff --git a/README.md b/README.md index 84a0230..0152e1d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# emgithub +# emgithub original info https://emgithub.com/ @@ -8,6 +8,10 @@ Demo: (scroll to the bottom of ![](https://user-images.githubusercontent.com/36265606/185886623-f5f5685d-1e99-43c8-8de2-085dd6954dd7.gif) +## This fork - "collapsible" + +This fork allows you to add a parameter "Collapsible" to the script call, that wraps the displayed script output in `
......
` tags. + ## Get started There are two ways to use the service: diff --git a/embed-v2.js b/embed-v2.js index 57bc797..6030a49 100644 --- a/embed-v2.js +++ b/embed-v2.js @@ -10,6 +10,8 @@ const showBorder = params.get("showBorder") === "on"; const showLineNumbers = params.get("showLineNumbers") === "on"; const showFileMeta = params.get("showFileMeta") === "on"; + const collapsible = params.get("collapsible") === "open" || params.get("collapsible") === "closed"; + const collapsibleOpen = params.get("collapsible") === "open"; const showFullPath = params.get("showFullPath") === "on"; const showCopy = params.get("showCopy") === "on"; const fetchFromJsDelivr = params.get("fetchFromJsDelivr") === "on"; @@ -299,6 +301,10 @@