From b29b2ad1ca4d95a2f57ce567b05ee576737aff05 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 4 Aug 2021 22:31:12 +0200 Subject: Try running at `document-idle` to initialise later in the page load The script was running too early, and the content of the element wasn't populated before it tried to set the title. Try running at `document-idle` to see if that fixes it. It doesn't. Looks like we're going to have to use a mutation observer. We would have needed to anyway, though, because the text can change while the page is open, and we want the tooltip to update accordingly. --- google-docs-last-edit-label.user.js | 1 + 1 file changed, 1 insertion(+) diff --git a/google-docs-last-edit-label.user.js b/google-docs-last-edit-label.user.js index 841a735..64b3f1d 100644 --- a/google-docs-last-edit-label.user.js +++ b/google-docs-last-edit-label.user.js @@ -3,6 +3,7 @@ // @description Show a tooltip when hovering over the last edit time label // @namespace com.teddywing // @version 0.0.1 +// @run-at document-idle // @match https://docs.google.com/* // ==/UserScript== -- cgit v1.2.3