Skip to content

Instantly share code, notes, and snippets.

@melannen
melannen / signal_boost.js
Last active Feb 12, 2019 — forked from shalott/signal_boost.js
tiny Dreamwidth signal boost bookmarklet
View signal_boost.js
var postURL = "https://www.dreamwidth.org/update.bml?event=";
var curURL = window.location.href;
// get the currently selected text (no longer used in boost)
function getSelectionText() {
var text = "";
if (window.getSelection) {
text = window.getSelection().toString();
} else if (document.selection && document.selection.type != "Control") {
text = document.selection.createRange().text;