Last active
February 20, 2023 16:53
-
-
Save bitplane/0c4555d05b1d46500ce6bc780ac2305a to your computer and use it in GitHub Desktop.
UserScript for Google Docs uncrop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Uncrops Google Docs images by removing the clip path. | |
// Doesn't work in Webkit due to canvas elements not being | |
// in the dom. So Firefox only for now. | |
// | |
// Click the "raw" button and import the URL into your userscript | |
// manager - tested in tampermonkey but should work in whatever. | |
// | |
// ==UserScript== | |
// @name Google Docs Uncrop | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Uncrop Google Docs images to reveal sensitive content | |
// @author [email protected] | |
// @match https://docs.google.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle('g { clip-path: none ! important; }'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment