Skip to content

Instantly share code, notes, and snippets.

@rmateu
rmateu / contenteditable.html
Created October 19, 2022 16:42
data:text/html, <html contenteditable> with some extra styling to make it easier to use. Just copy/paste the code in your browser and type away. Or make it a bookmarklet.
data:text/html;charset=utf-8,<title>TextEditor</title><style>body{background:#fbfbfb;color:#333;margin:0%50auto;width:100%}textarea{background:#fbfbfb;border:0;color:#333;font-family:Roboto;font-size:1rem;height:98%;line-height:1.4;margin:0%20auto;outline:0;padding:2rem;width:100%}button{background-color:#fbfbfb;border:1px%20#ccc%20solid;color:#999;cursor:pointer;float:right;margin:10px%200;padding:5px%2010px}@media%20(max-width:100%){body{width:100%;padding:0}textarea{padding:10px}button{float:none}}</style><body><button%20onclick="sM();%20return%20false">Draft%20this</button><textarea%20contenteditable%20id=TE%20spellcheck=false%20placeholder=Notes...%20autofocus></textarea><script>function%20sM(){var%20a="drafts://x-callback-url/create?tag=BrowserNotes&text="+escape(document.getElementById("TE").value);window.location.href=a};</script>
javascript:a=1;/** Copy & paste your event name and key over there. --> **/ d={event:' my_event_name ',key:' abcdefghijklmnopqrstuvwxyz '}; /** --> Please don't touch this --> **/ u='https://maker.ifttt.com/trigger/'+d.event.trim()+'/with/key/'+d.key.trim()+'?t='+(new Date()).getTime();window.open(u).close();/** Go to the very beginning **/
@rmateu
rmateu / Amazon_MD.js
Last active September 10, 2018 11:06 — forked from mokkunp/bookmarklet.md
Amazon Books Title, author and image bookmarklet.
var title = document.getElementById("ebooksProductTitle");
if (title == null) {
title = document.getElementById("productTitle")
};
title = title.innerText;
var imageUrl = document.getElementById("ebooksImgBlkFront");
if (imageUrl == null) {
imageUrl = document.getElementById("imgBlkFront")
};
imageUrl = imageUrl.src;

Backtick.io - Save to Pinboard

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@rmateu
rmateu / README.md
Last active December 29, 2015 08:29 — forked from JoelBesada/README.md
Backtick command for Pinboard

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@rmateu
rmateu / amznshortener.js
Created September 22, 2011 21:47
Amazon Short URL Bookmarklet
(function(){
var id = '';
var asin = document.getElementById('ASIN');
var asin0 = document.getElementsByName('ASIN.0');
var title = document.title.replace("Amazon.com: ", "");
if (asin)
id = asin.value;
else if (asin0)
id = asin0[0].value;