From 0aa6611ad960fdc546ccdf6267c625148d2d2ce1 Mon Sep 17 00:00:00 2001 From: "Silas S. Brown" <ssb22@cam.ac.uk> Date: Tue, 21 May 2019 07:46:25 +0100 Subject: [PATCH] Update Annotator Generator --- annogen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/annogen.py b/annogen.py index e34f184..db61131 100755 --- a/annogen.py +++ b/annogen.py @@ -1332,7 +1332,7 @@ if epub: jsAddRubyCss += "+((location.href.slice(0,12)=='http://epub/')?'li{disp if android_print: jsAddRubyCss += "+' @media print { .ssb_local_annotator_noprint, #ssb_local_annotator_bookmarks { visibility: hidden !important; } }'" jsAddRubyCss += "+'</style>'" def bookmarkJS(): - "Returns inline JS expression (to be put in parens) that evaluates to HTML fragment to be added for bookmarks, and event-setup code to be added after (to work around onclick= restrictions on some sites)" + "Returns inline JS expression (to be put in parens) that evaluates to HTML fragment to be added for bookmarks, and event-setup code to be added after (to work around onclick= restrictions on some sites, i.e. ones that set the HTTP header Content-Security-Policy: unsafe-inline)" assert not '"' in android, "bookmarkJS needs re-implementing if --android URL contains quotes: please %-escape it" should_show_bookmarks = "(location.href=='"+android.replace("'",r"\\'")+"'&&!document.noBookmarks)" # noBookmarks is used for handling ACTION_SEND, since it has the same href (TODO @lower-priority: use different href instead?) are_there_bookmarks = "ssb_local_annotator.getBMs().replace(/,/g,'')" -- GitLab