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); } | |
})(); |
@vanbang9710 Hi, I'v changed the file name as you wish.
I wonder whether there is any way of hiding the hypothesis sidebar (without deactivating the script), or perhaps moving the expand button ("<") to a different place?
Reason: in its default position at the top right corner, that button tends to cover site navigation or menu items. A floating button that can be positioned wherever it's not in the way would be great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you please change the file name to Hypothesis.user.js for easier integration to Tampermonkey?