« first day (4162 days earlier)      last day (623 days later) » 

ydd
ydd
04:39
Is there a better way to copy long code blocks from a question other than highlighting it with your cursor?
 
5 hours later…
10:05
@ydd none that I know about. Copying long code from stackexchange post has always been prone to error for me. I always avoid copying large code when I see one. If it does not fit on small scree, I will not try it.
 
4 hours later…
14:05
@ydd Perhaps not better:
TabView@DeleteCases[$Failed]@
  Map[ToExpression[#, StandardForm, Hold] &]@
   Flatten@Cases[
     Import["https://mathematica.stackexchange.com/questions/286330/\
how-to-put-an-expression-after-d-in-integration", "XMLObject"],
     XMLElement["pre", _, t_] :>
      Cases[t, XMLElement["code", _, c_] :> c, Infinity], Infinity]
<code> elements are imported in the form XMLElement["code",_,_]. Code blocks are wrapped in "pre" elements.
Someone once wrote a package for importing a Q&A as a notebook. Probably it's on meta. I can't find it. The version I have does not work. But the possibility is there.
 
2 hours later…
15:54
@ydd Usually what I do is select the first or last line os code, scroll to the other end of the code, shift-click to select all the code, and copy.
ydd
ydd
16:21
@MichaelE2 thanks. And yes @Nasser I have the same problem
 
4 hours later…
20:05
@ydd The following browser bookmarklet will concatenate and copy all code blocks (PRE elements) on the page onto the clipboard:
3
javascript:navigator.clipboard.writeText(Array.from(document.querySelectorAll("pre")).map(b => b.innerText).join("\r\n\r\n/********/\r\n\r\n"))
or, to get just the PRE element that contains the current selection (no need to select the entire block):
javascript:navigator.clipboard.writeText(window.getSelection().anchorNode.parentNode.closest("pre").innerText)

« first day (4162 days earlier)      last day (623 days later) »