ma1 pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • browser/components/BrowserGlue.sys.mjs
    ... ... @@ -189,8 +189,17 @@ const ClipboardPrivacy = {
    189 189
         return trans;
    
    190 190
       },
    
    191 191
       _computeClipboardHash() {
    
    192
    +    const flavors = ["text/x-moz-url", "text/plain"];
    
    193
    +    if (
    
    194
    +      !Services.clipboard.hasDataMatchingFlavors(
    
    195
    +        flavors,
    
    196
    +        Ci.nsIClipboard.kGlobalClipboard
    
    197
    +      )
    
    198
    +    ) {
    
    199
    +      return null;
    
    200
    +    }
    
    192 201
         const trans = this._createTransferable();
    
    193
    -    ["text/x-moz-url", "text/plain"].forEach(trans.addDataFlavor);
    
    202
    +    flavors.forEach(trans.addDataFlavor);
    
    194 203
         try {
    
    195 204
           Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
    
    196 205
           const clipboardContent = {};