message: Add double clicking as alternate for reverse synctex
diff: @@ -270,16 +270,9 @@ if (embedded) {
  })
  }
  -document.addEventListener('pagesinit', () => {
  - const viewerDom = document.getElementById('viewer')
  - for (const pageDom of viewerDom.childNodes) {
  - const page = pageDom.dataset.pageNumber
  - const viewerContainer = document.getElementById('viewerContainer')
  - pageDom.onclick = (e) => {
  +
  +function callSynctex(e, page, pageDom, viewerContainer) {
  const canvasDom = pageDom.getElementsByTagName('canvas')[0]
  - if (!(e.ctrlKey || e.metaKey)) {
  - return
  - }
  const selection = window.getSelection();
  let textBeforeSelection = ''
  let textAfterSelection = ''
  @@ -300,6 +293,21 @@ document.addEventListener('pagesinit', () => {
  const pos = PDFViewerApplication.pdfViewer._pages[page-1].getPagePoint(left, canvasDom.offsetHeight - top)
  socket.send(JSON.stringify({type:'click', path:pdfFilePath, pos, page, textBeforeSelection, textAfterSelection}))
  }
  +
  +document.addEventListener('pagesinit', () => {
  + const viewerDom = document.getElementById('viewer')
  + for (const pageDom of viewerDom.childNodes) {
  + const page = pageDom.dataset.pageNumber
  + const viewerContainer = document.getElementById('viewerContainer')
  + pageDom.onclick = (e) => {
  + if (!(e.ctrlKey || e.metaKey)) {
  + return
  + }
  + callSynctex(e, page, pageDom, viewerContainer)
  + }
  + pageDom.ondblclick = (e) => {
  + callSynctex(e, page, pageDom, viewerContainer)
  + }
  }
  });
  