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
// ==UserScript== | |
// @name Don't Edit Documents from Teams | |
// @version 1 | |
// @include https://*.sharepoint.com/* | |
// @grant none | |
// ==/UserScript== | |
const searchParams = new URLSearchParams(location.search) | |
if (searchParams.get("wdOrigin") === "TEAMS-ELECTRON.teamsSdk.openFilePreview" && searchParams.get("action") === "edit") { |
OlderNewer