Skip to content

Instantly share code, notes, and snippets.

@duqcyxwd
duqcyxwd / titleUrlMarkdownClip.js
Created September 1, 2021 22:25 — forked from idelem/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@duqcyxwd
duqcyxwd / github-gist-in-iframe.html
Created September 3, 2021 03:43 — forked from sundbry/github-gist-in-iframe.html
Embed a Github Ggist in an iframe (without <script> tags in your document)
<iframe frameborder=0
style="min-width: 200px; width: 60%; height: 460px;"
scrolling="no"
seamless="seamless"
srcdoc='<html><body><style type="text/css">.gist .gist-data { height: 400px; }</style><script src="https://gist.github.com/sundbry/5e0507d93d4c89023b2ba5f39f27f722.js"></script></body></html>'
></iframe>