Skip to content

Instantly share code, notes, and snippets.

View johnfmorton's full-sized avatar
⌨️
Making stuff

John F Morton johnfmorton

⌨️
Making stuff
View GitHub Profile
@johnfmorton
johnfmorton / clipboard.ts
Created December 28, 2022 19:15 — forked from max10rogerio/clipboard.ts
Example Copy to Clipboard with Typescript
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
/**
* Interface CopyToClipboard params
*/
interface ICopyToClipboard {
/** HTML reference identifier ```<div id="foo"></div>``` */
target?: string;
/** String value */
value?: string;
@johnfmorton
johnfmorton / jekyll-collections-prev-next-wrap-around.html
Last active May 16, 2019 15:46 — forked from budparr/jekyll-collections-prev-next.html
Previous Next Links for Jekyll Collections - with wrap around to beginning link and last link when needed
{% capture the_collection %}{{page.collection}}{% endcapture %}
{% if page.collection %}
{% assign document = site[the_collection] %}
{% endif %}
<h1>TITLE: {{ page.title }}</h1>
{% for links in document %}
{% if forloop.first %}
{% assign first = links %}
{% endif %}
{% if forloop.last %}