1. 07 Oct, 2020 1 commit
    • Robert Knight's avatar
      Remove logic to ignore Hypothesis UI when generating range selectors · 0649e964
      Robert Knight authored
      Remove the logic that was intended to ignore Hypothesis UI when
      generating range selectors.
      
      We don't need this any more because all Hypothesis UI elements in the
      host page which contain text have `user-select` set to prevent text
      selection. This affects the bucket bar, vertical toolbar and adder.
      
      In addition, the logic did not serve its intended purpose as it only applied to
      range selector generation. If the user did somehow succeed in selecting text in
      the bucket bar for example the client would still generate quote and position
      selectors that referred to that content. What the client would need to
      do instead is modify the range from which the annotation's selectors
      were generated.
      
      As a side effect this fixes a regression introduced in a5540581 which caused
      range selector generation to fail in Chrome and Firefox due to use of
      `:not(<inner selector>)` selector where `<inner selector>` is a
      list of selectors (the `IGNORE_SELECTOR` value from `guest.js`).
      0649e964
  2. 06 Oct, 2020 21 commits
  3. 05 Oct, 2020 5 commits
  4. 02 Oct, 2020 3 commits
    • Kyle Keating's avatar
      Convert types.coffee to js · 43f23cc5
      Kyle Keating authored
      - Convert types to js
      - Add missing test coverage in types module
      43f23cc5
    • Robert Knight's avatar
      Fix grammatical error in comment · 4033f872
      Robert Knight authored
      Respond to PR feedback by updating comments
      4033f872
    • Robert Knight's avatar
      Simplify XPath generation code · f2b25403
      Robert Knight authored
      For reasons that AFAIK are no longer relevant, there were two
      implementations of XPath generation for use in serializing range
      selectors. Since we're removing jQuery from the Hypothesis client, this
      removes the jQuery implementation and simplifies the remaining DOM-only
      one.
      
       - Remove jQuery XPath generation
      
       - Change the non-jQuery implementation to take DOM Nodes as input
         rather than jQuery collections
      
       - Simplify and add type documentation for the remaining implementation
      
       - Correct the documentation for `xpathFromNode`. The previous comments
         said that it _evaluated_ XPaths but actually it _generates_ them.
      f2b25403
  5. 30 Sep, 2020 1 commit
    • Robert Knight's avatar
      Remove references to obsolete `page.el` property · 2414a08b
      Robert Knight authored
      The `el` property of PDF pages was removed from PDF.js in February 2015
      in eed67ea8bbba61a05877a99dc2f03b5adad5a288 so we can remove this check
      while still supporting older versions of PDF.js that we care about.
      
      Also rewrite an unnecessarily complex loop header. The `pagesCount`
      property cannot be negative, so there is no need to check for this.
      2414a08b
  6. 29 Sep, 2020 9 commits