diff --git a/git-diff-flex.js b/git-diff-flex.js index bfd0e71..d347353 100644 --- a/git-diff-flex.js +++ b/git-diff-flex.js @@ -15,6 +15,19 @@ // The main program... just mark the tables findTables(); + // Find tables when user clicks on the "files" sub-nav tab + let subNav = document.querySelector('a.tabnav-tab[href$="files"]'); + if (subNav) { + subNav.addEventListener('click', () => { + let to = setTimeout(() => { + if (document.getElementById('files_bucket')) { + findTables(); + clearTimeout(to); + } + }, 100); + }); + } + /** * Recalculate the handle on window resize. */ diff --git a/manifest.json b/manifest.json index cfb545d..1573d0a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Git Diff Flex", - "version": "1.0.2", + "version": "1.0.3", "description": "Git Diff Flex adds a draggable pane bezel between two files when comparing diffs! Currently only for github.com.", "permissions": [ "activeTab",