[Livehttpheaders] How to disable the newline appended to each line when coping to clipboard?

blackcode at speedpost.net blackcode at speedpost.net
Fri Mar 18 01:10:03 PDT 2011


On Fri, 18 Mar 2011 13:23 +0530, blackcode at speedpost.net wrote:
> 
> On Fri, 18 Mar 2011 09:02 +0530, blackcode at speedpost.net wrote:
> > If I right click on a line in LiveHTTPHeaders and copy something like a
> > url or something, it automatically appends a newline. This behavior is a
> > bit annoying when you paste it into a terminal. Is there a way I can
> > copy it without the newline? I'm looking at the source and I don't see
> > the relevant code that handles it. I think a simple regex search and
> > replace to remove the \n should suffice, right?
> > -- 
> >   
> >   blackcode at speedpost.net
> > 
> > -- 
> > http://www.fastmail.fm - Or how I learned to stop worrying and
> >                           love email again
> > 
> > _______________________________________________
> > Livehttpheaders mailing list
> > Livehttpheaders at mozdev.org
> > https://www.mozdev.org/mailman/listinfo/livehttpheaders
> > 
> 
> 
> Hm, I've added data = data.replace('\n',''); to the toClipboard function
> in LiveHTTPHeaders.js but that didn't do it.
> -- 
>   
>   blackcode at speedpost.net
> 
> -- 
> http://www.fastmail.fm - Faster than the air-speed velocity of an
>                           unladen european swallow
> 
> _______________________________________________
> Livehttpheaders mailing list
> Livehttpheaders at mozdev.org
> https://www.mozdev.org/mailman/listinfo/livehttpheaders
> 

Sorry about the multiple mails. I got it done. Just in case anyone else
is looking to do the same,


  toClipboard: function(data) {
    data = data.replace(new RegExp("\r\n$"),"");
    livehttpheaders.info.toClipboard(data);
  },
-- 
  
  blackcode at speedpost.net

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow



More information about the Livehttpheaders mailing list