Chrome extension to allow text selection

35,633

Solution 1

No script is built into Chrome:

Options>Under the Hood tab>Content settings>JavaScript tab-Tick "do not allow any site to run javascript.

If you need to enable it on a site, either add the site to the exceptions list, or visit the site, then click the javascript icon in the address bar and select "always allow JS on www.xxxx", this will add it to the exceptions list, then refresh the webpage to allow JS to run.

EDIT:

Now it is 2015 and blocking javascript just cripples or breaks most websites so what I do now is i just do a "view page source" in Chrome and copy text from there, a bit harder but at least i can get it.

Solution 2

There is a chrome extension that lets you select text called Selectable. It works on websites like FanFiction, which is what I needed it for.

Solution 3

I don't think either of those answers are helpful. There is now CSS code to block text selection so turning off or blocking javascript is not a help.

So far I have not found an extension for Chrome to help with this, but I did find a bookmarklet:

I have noticed at least one lyrics website has started preventing users from copying lyrics. (As if the lyrics website has a copyright on someone else’s song lyrics!) While there are some good user-experience reasons to disable text selection for certain parts of a web app, but clearly entire the point of a lyrics website is to look up lyrics — and selecting lines can make it easier to read in your browser, or perhaps you want to paste the lyrics into an MP3’s ID3 data (“Get Info” in iTunes).

So screw that.

Here’s a bookmarklet that should allow you to select anything on a web page. It’s not an ultimate solution, but it works for me. Just click it on an offending page.

Reference: http://alanhogan.com/code/text-selection-bookmarklet

Solution 4

SuperCopy works for me, and it's 5 stars on the Chrome store.

Solution 5

You can use bookmarklet for this.

javascript:(function(){function allowTextSelection(){window.console&&console.log('allowTextSelection');var style=document.createElement('style');style.type='text/css';style.innerHTML='*,p,div{user-select:text !important;-moz-user-select:text !important;-webkit-user-select:text !important;}';document.head.appendChild(style);var elArray=document.body.getElementsByTagName('*');for(var i=0;i<elArray.length;i++){var el=elArray[i];el.onselectstart=el.ondragstart=el.ondrag=el.oncontextmenu=el.onmousedown=el.onmouseup=function(){return true};if(el instanceof HTMLInputElement&&['text','password','email','number','tel','url'].indexOf(el.type.toLowerCase())>-1){el.removeAttribute('disabled');el.onkeydown=el.onkeyup=function(){return true};}}}allowTextSelection();})();

Source

Share:
35,633

Related videos on Youtube

DisgruntledGoat
Author by

DisgruntledGoat

I'm a web developer and programmer from the UK. I'll fill this out more when I can be bothered; really I'm just trying to get the autobiography badge.

Updated on September 17, 2022

Comments

  • DisgruntledGoat
    DisgruntledGoat almost 2 years

    I've come across a lot of sites that block the right click (context) menu and prevent selection of text by dragging.

    I found a Chrome extension, Allow Right Click, which solves the first problem, but what about the text selection? Does anyone know if there is an extension available?

  • DisgruntledGoat
    DisgruntledGoat about 14 years
    One site where I noticed it has events attached to the body, eg: <body ondragstart="return false">
  • DisgruntledGoat
    DisgruntledGoat about 14 years
    Ah yes, very useful. I basically did the opposite of what you suggested - blacklisted sites instead of whitelisting them. The only problem will be if a site has other useful javascript in addition to the click/select annoyances.
  • paragbaxi
    paragbaxi over 9 years
    Thanks. Looks like it works for certain types of scripts but not WP Content Copyright Protection.
  • Michael Scheper
    Michael Scheper almost 9 years
    This might've made sense in 2010, but it pretty much breaks the web of 2015.
  • Michael Scheper
    Michael Scheper almost 9 years
    It may make sense for clicking and moving text to do something other than selecting the text, such as moving an object containing text. But I don't think it ever makes sense to make text impossible to select. So often, I want to copy a filename from Google Drive, a name from Facebook, etc, but am forced to error-prone manual typing, because of those sites' UX-fail. Sadly, this bookmarklet doesn't seem to solve either issue, at least in Firefox.
  • glenviewjeff
    glenviewjeff almost 8 years
    Worked for me on the student directory site where I needed to select text.
  • NonlinearFruit
    NonlinearFruit over 7 years
    Inspect element works for html generate by js
  • pqnet
    pqnet almost 7 years
    I have a better solution for you. Just uninstall browser and read a newspaper
  • vonjd
    vonjd over 6 years
    kaspersky says that it comes with a rootkit Trojan.Script.Generic -> deinstalled extension
  • agcala
    agcala over 5 years
    @Calophi Actually there is CSS code to block text selection: user-select