How can I copy text from a web page where it been has disabled?

48,298

Solution 1

In Chrome or any of the popular modern browsers, open Developer Tools by clicking F12 and then click on the magnifying glass icon (or equivalent icon in other browsers) to turn on inspect mode. Move to the content within the web page and point to the specific portion of text that you want to copy. The HTML code corresponding to the pointed area will appear in the docked Dev Tools window. Double click on the HTML code to copy the content you need.

Alternatively, you can save the page as a text file in Internet Explorer and then you can get just the text within the web page in the text file. In IE, choose File > Save As and in the dialog box that opens up, specify the Save as type as Text file.

Solution 2

If you're worried about disputes with the provider, then a simple text log might not be very good evidence. Unless there's some way to verify the text was actually from the website chat you claim it did, they could easily argue that it's not real.

You might want to use screenshots instead. Simply hit the "Print Screen" key on your keyboard and then open a graphics program like MSPAINT and paste. You can also use a word processing program like Microsoft Word or even WORDPAD that still comes with Windows and paste it in there.

If there's more text than fits on one screen, do it in steps and take more screenshots. One good thing with the screenshots is that you'll have the full image of the webpage showing the text of the support chat is really coming from their website and representative.

Solution 3

My answer was here: How do websites block selecting text and how do I unblock that?

I post this because that answer on this site does not come up on a search for "copy and paste" nor "clipboard" which is often how a user (say, eg, me) might search for it.

In my case it was a CSS property -moz-user-select in a style attribute on a tag in the page source.

But any of the user-select CSS property variants may be the culprit for you.

Solution 4

Open browser's console (CTRL + Shift + J), and enter the following command:

document.onselectstart = null

Share:
48,298

Related videos on Youtube

Rajesh Abraham
Author by

Rajesh Abraham

Updated on September 18, 2022

Comments

  • Rajesh Abraham
    Rajesh Abraham over 1 year

    I use FF27 with noscript, but solutions for Chrome are also welcome.

    I use online chat for customer support when available, and I'd like to keep the chat transcript in case of a dispute with the provider. My credit card provider has such a chat interface, but has disabled copying the text - using javascript I assume (is there another way?). I have no knowledge of JS, but I notice that when I select text, the selection vanishes at the next event (such as click or after some time), I could find no way to bring up the context menu and ctrl-c has no effect. I'd like to circumvent that with minimal impact on other pages. I'd rather not install extensions.

    FF used to have an option in the settings UI to disable certain javascript features, but it was removed. I've found about:config settings that disable JS overriding the context menu, and disable clipboard events - but both of those are global and the former will probably mess sites like Google Docs too much for my taste. I haven't looked at what Chrome has to offer in terms of non-UI settings. I couldn't find any fine-grained JS control on NoScript, but I assume it's possible to filter out the JS code that disables copying text.

    • Dave
      Dave over 10 years
      Can you view the source of the webpage? If so, it may be present in there?
    • Rajesh Abraham
      Rajesh Abraham over 10 years
      Will the text typed by myself and the service rep be present in the source?
    • Dave
      Dave over 10 years
      It's hard to know really - it depends on how the site is set up etc
  • robartsd
    robartsd about 9 years
    Of course even a screenshot could be claimed to be a forgery; however, as it would take more effort to create a convincing fake screenshot than a fake text log, the screenshot does add some credibility.
  • user276648
    user276648 almost 7 years
    This also allows you to paste things (some websites don't allow you to paste in input fields for ex).
  • Jon
    Jon about 6 years
    This only works if onselectstart is applied to the document, not any specific element