ma1 pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
e75a4f4e
by hackademix at 2024-10-17T22:21:33+02:00
1 changed file:
Changes:
... | ... | @@ -185,8 +185,17 @@ const ClipboardPrivacy = { |
185 | 185 | return trans;
|
186 | 186 | },
|
187 | 187 | _computeClipboardHash() {
|
188 | + const flavors = ["text/x-moz-url", "text/plain"];
|
|
189 | + if (
|
|
190 | + !Services.clipboard.hasDataMatchingFlavors(
|
|
191 | + flavors,
|
|
192 | + Ci.nsIClipboard.kGlobalClipboard
|
|
193 | + )
|
|
194 | + ) {
|
|
195 | + return null;
|
|
196 | + }
|
|
188 | 197 | const trans = this._createTransferable();
|
189 | - ["text/x-moz-url", "text/plain"].forEach(trans.addDataFlavor);
|
|
198 | + flavors.forEach(trans.addDataFlavor);
|
|
190 | 199 | try {
|
191 | 200 | Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
|
192 | 201 | const clipboardContent = {};
|