itty-bitty/docs/render/bookmarklet.js
2022-02-15 17:28:50 -06:00

11 lines
512 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

let url = params.body
let title = params.title
loadSyle(document.currentScript.src.replace("js", "css"))
document.body.appendChild(
el("div", {id:"content"},
el("a", {href:url, innerText:"Script: " + title || "Bookmarklet"}),
el("p", {id:"emoji", innerText:"☝️"}),
el("p", {innerText:"Drag this bookmarklet to your bookmarks / favorites to use it."}),
el("p", {innerText:"On mobile, bookmark this page, then edit the address to remove everything to the left of 'javascript:'."})
)
);