created | assets | tags |
---|---|---|
<% tp.date.now('YYYY-MM-DD') %>T<% tp.date.now('HH-mm') %> |
<% tp.file.path(false).split('/').slice(0, -1).join('/') + '/_resources/' + tp.file.title + '.assets/' %> |
assets
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
| |
body { |
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
<!DOCTYPE html> | |
<index> | |
<head> | |
<title>Bookmarklet Maker</title> | |
<meta name="keywords" content="bookmarklet, hack, javascript, automate, browse, app"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="description" content="Bookmarklet creator tool."> | |
<meta name="author" content="Caio Rodrigues."> | |
<style> | |
/* body {background-color: powderblue;} */ |
javascript: (function () { | |
document.querySelectorAll('.BRpageimage').forEach(i => { | |
const url = new URL(i.src); | |
const filename = url.searchParams.get('file').split('/').pop().replace('.jp2','.jpg'); | |
url.searchParams.set('scale', 1); | |
dl(url.href, filename); | |
}); | |
function dl(url, filename) { | |
function blob2B64(blob, callback) { |
// Bookmarklet for [Pins.app](https://get-pins.app/) (requires version 1.6+) | |
// Removes Google Analytics strings | |
// Removes Product Hunt query string | |
// Prefers canonical url if defined | |
// Uses selected text for description, falling back to meta description | |
// Removes pipes (|) from title | |
// To allow use on any website in Firefox, go to about:config and set security.external_protocol_requires_permission to false | |
// Copy this to your URL bar: | |
javascript:!function(){function e(e){var n="pins://launch?screen=newPost&",i=o();""===i&&(i=r()),n+="url="+encodeURIComponent(e),n+="&",n+="title="+encodeURIComponent(t()),n+="&",n+="description="+encodeURIComponent(i),document.location.href=n}function t(){var e=document.title;return e.replace(/\|/g,"-")}function n(){for(var e=document.getElementsByTagName("link"),t=0;t<e.length;t++)if(e[t].attributes.hasOwnProperty("rel")&&"canonical"===e[t].attributes.rel.textContent.toLowerCase())return e[t].attributes.href.textContent;var n,o=document.location.href.split(/[?&]([^&]+)/ |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Obsidian Templater Helper to Insert Clipboard Contents into MD Notes | |
Use Templater to control how Obsidian processes images pasted into notes. | |
N.B. Its functionality would be better as a plugin. This solution is fairly hacky. | |
Only tested on MacOS with Python 3.8. | |
Image in clipboard is saved to: |
Some other resources:
#SingleInstance Force | |
ShowNotification(title, text) | |
{ | |
notif_option := 0x24 | 32 | |
TrayTip(text, title, notif_option) | |
} | |
SetMuteAll(state, check) | |
{ |
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; |