New (Firefox)!!! Instructions for copying code from these threads (also IE)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    New (Firefox)!!! Instructions for copying code from these threads (also IE)

    If you are using Firefox as you browser, you'll probably have discovered that the new-style [code] tags don't allow you to copy posted code without an annoying "#" on every other line.
    In order for you to get the raw text of the posted code, just hit the "Reply" button, copy what's between the tags and browse "Back" to the OP.

    Hope that helps,
    Barton
    Last edited by bartonc; Jun 30 '07, 08:00 AM. Reason: Not on IE7 any more
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    I have been saving the copied code to a text file and running this script:[code=Python]fn = 'script.txt'
    outFile = 'script.py'

    f = open(fn)
    fList = [line.rstrip()[6:] for line in f]
    f.close()

    f=open(outFile, 'w')
    f.write('\n'.jo in([i for i in fList if i != '']))
    f.close()[/code]Thanks for the tip, Barton. That will be easier.

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by bvdet
      I have been saving the copied code to a text file and running this script:[code=Python]fn = 'script.txt'
      outFile = 'script.py'

      f = open(fn)
      fList = [line.rstrip()[6:] for line in f]
      f.close()

      f=open(outFile, 'w')
      f.write('\n'.jo in([i for i in fList if i != '']))
      f.close()[/code]Thanks for the tip, Barton. That will be easier.
      You are welcome. The funny thing is (living in relative isolation from eachother, as we do), I didn't think that this would really affect many users. I'm glad to know that a simple IE user can come up with solutions to other's problems.

      Thanks for the script, too. I've quoted you over on the Feedback Forum. It'll be interesting to see other's reactions.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by bartonc
        If you are using Firefox as you browser, you'll probably have discovered that the new-style [ code ] tags don't allow you to copy posted code without an annoying "#" on every other line.
        In order for you to get the raw text of the posted code, just hit the "Reply" button, copy what's between the tags and browse "Back" to the OP.

        Hope that helps,
        Barton
        I now looks as if these instructions apply to everybody. Long lines like:
        Code:
            print '*****************************************************************'
        get spaces added in some weird place. I remember having this problem in IE a long time ago.

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          If found the coolest solution for Firefox users who regularly visit sites that work poorly (or won't work at all - like Window Update) on Firefox!

          Just go get ietab for firefox.
          It works very well, but you do lose the spell checker.

          Comment

          • latitude
            New Member
            • Nov 2006
            • 50

            #6
            ehh...so what happened to my post bartonc???? who deleted it and why??

            Comment

            • bartonc
              Recognized Expert Expert
              • Sep 2006
              • 6478

              #7
              Originally posted by latitude
              ehh...so what happened to my post bartonc???? who deleted it and why??
              Do you mean the one in this thread? I split it out to separate the issues being discussed. It was easy to find: Click you name (link to profile) click "find all posts be latitude".

              Comment

              • latitude
                New Member
                • Nov 2006
                • 50

                #8
                Ah right, thanks for clearing that up...

                Thats such a nice feature it really should be in the control panel - makes life abit more easier!

                Comment

                • bartonc
                  Recognized Expert Expert
                  • Sep 2006
                  • 6478

                  #9
                  Firefox users: Clear your cache for a big surprise!

                  Comment

                  • RedSon
                    Recognized Expert Expert
                    • Jan 2007
                    • 4980

                    #10
                    Originally posted by bartonc
                    Firefox users: Clear your cache for a big surprise!
                    I did that but my toaster exploded! You are evil Barton, pure evil! Now I need to buy a new toaster.

                    Comment

                    • tharden3
                      Contributor
                      • Jul 2008
                      • 916

                      #11
                      gracias for the tip. I just got firefox (well, I got Ubuntu with firefox) so thanks.

                      Comment

                      • Formula
                        New Member
                        • Aug 2008
                        • 11

                        #12
                        Hi everyone,I used to copy the code.
                        After that, opening Kwrite on linux.
                        Then, press Ctrl + R search with regex and put this regex
                        \s\s+\d+[.]+\n+\s{6}
                        then replace all.

                        Comment

                        Working...