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

Commits:

1 changed file:

Changes:

  • browser/components/BrowserGlue.sys.mjs
    ... ... @@ -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 = {};