.md for great justice!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

1.4 KiB

title layout tags toplevel permalink
make hypothes.is bookmarklet work where sites block it page [technicalities user scripts] false /user-scripts/hypothesis/

If you're a hypothes.is user on Firefox, you'll be familiar with their little bookmarklet that tacks the annotation interface onto the side of any webpage.

Well, almost any webpage. Sometimes the settings will block the JavaScript from being able to execute right. I've got a few here where you can see it's been useful to me.

Tampermonkey to the rescue! That same bookmarklet code just gets shoved in a script.

// ==UserScript==
// @name         hypothesize
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  sometimes settings block the hypothes.is bookmarklet from working. this uses a sledgehammer to make it work.
// @author       https://maya.land/
// @match        https://news.ycombinator.com/*
// @match        https://*.marginalia.nu/*
// @match        https://*.bulletin.com/*
// @match        https://forum.obsidian.md/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};
    var d=document,s=d.createElement('script');
    s.setAttribute('src','https://hypothes.is/embed.js');
    d.body.appendChild(s)
})();