Last active
January 7, 2024 23:00
-
-
Save AFutureD/7a5674cd515ebb57db7ac5b5bff47049 to your computer and use it in GitHub Desktop.
A Tempermonkey script for Hypothes.is
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hypothesis | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author AFuture | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
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) | |
var css = ""; css += [ | |
"[class^=\"annotator-bucket-bar\"]{display:none;}" | |
].join("\n"); | |
var node = document.createElement("style"); | |
node.type = "text/css"; | |
node.appendChild(document.createTextNode(css)); | |
var heads = document.getElementsByTagName("head"); | |
if (heads.length > 0) { heads[0].appendChild(node); } | |
else { document.documentElement.appendChild(node); } | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
用了好几年,才找到这个好东西