Restore Revision Time Visual Text in Google Apps

Brings back visual last edit text in drive apps due to M3 migration by Google.

< Opiniones de Restore Revision Time Visual Text in Google Apps

Puntuación: Pasable; el script funciona, pero tiene carencias importantes

§
Publicado: 2/1/2024

Useful script! Worked for awhile but broke because Google changed their CSP. Luckily it is simple to fix. Add this at the top of the function:

const escapeHTMLPolicy = trustedTypes.createPolicy("default", {
    createHTML: (string) => string,
});

Then tweak the two lines that set use HTML strings to use the sanitization function as follows:

const fragmentForRevisionVisualTextHTML = rangeForRevisionVisualTextHTML.createContextualFragment(escapeHTMLPolicy.createHTML(revisionVisualTextHTML));
revisionVisualTextElement.innerHTML = escapeHTMLPolicy.createHTML(revisionTextFromButton);
zachthedevAutor
§
Publicado: 2/1/2024

Thanks! I just posted the update.

Publicar respuesta

Inicia sesión para responder.