ma1 pushed to branch base-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • browser/components/BrowserGlue.sys.mjs
    ... ... @@ -165,8 +165,17 @@ const ClipboardPrivacy = {
    165 165
         return trans;
    
    166 166
       },
    
    167 167
       _computeClipboardHash() {
    
    168
    +    const flavors = ["text/x-moz-url", "text/plain"];
    
    169
    +    if (
    
    170
    +      !Services.clipboard.hasDataMatchingFlavors(
    
    171
    +        flavors,
    
    172
    +        Ci.nsIClipboard.kGlobalClipboard
    
    173
    +      )
    
    174
    +    ) {
    
    175
    +      return null;
    
    176
    +    }
    
    168 177
         const trans = this._createTransferable();
    
    169
    -    ["text/x-moz-url", "text/plain"].forEach(trans.addDataFlavor);
    
    178
    +    flavors.forEach(trans.addDataFlavor);
    
    170 179
         try {
    
    171 180
           Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
    
    172 181
           const clipboardContent = {};