• Sean Hammond's avatar
    Add a blocklist of sites we don't launch on · dcf9d03e
    Sean Hammond authored
    The blocklist is configured in production.ini like so:
    
        h.blocklist = {
            "seanh.cc": {},
            "finance.yahoo.com": {},
            "twitter.com": {}
        }
    
    The Chrome extension handles the blocklist in the same way that it
    handles other launch errors (e.g. when the user hasn't given the
    extension permission to annotate file:/// URLs): it adds a (!) error
    badge to the "browser action" button, if the button is clicked again it
    opens a "help" page saying that the site isn't supported yet.
    
    It doesn't seem to be possible to pass data into the Chrome extension's
    help pages (as far as I can tell) so the error is just "Hypothesis
    doesn't work on this page yet" and not e.g. "Hypothesis doesn't work on
    twitter.com".
    
    The bookmarklet handles the blocklist in the same way that it handles
    other launch errors (e.g. trying to annotate a PDF when PDF.js isn't
    available): it uses window.alert() to show an error.
    dcf9d03e
Name
Last commit
Last update
h Loading commit data...
package.json Loading commit data...