1. DLP Flash Christmas Competition + Writing Marathon 2024!

    Competition topic: Magical New Year!

    Marathon goal? Crank out words!

    Check the marathon thread or competition thread for details.

    Dismiss Notice
  2. Hi there, Guest

    Only registered users can really experience what DLP has to offer. Many forums are only accessible if you have an account. Why don't you register?
    Dismiss Notice
  3. Introducing for your Perusing Pleasure

    New Thread Thursday
    +
    Shit Post Sunday

    READ ME
    Dismiss Notice

How can I break fanfiction.net's highlight protection?

Discussion in 'Tech Support' started by yak, Oct 11, 2013.

  1. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    A couple of days ago I noticed that I couldn't highlight or copy any content from fics on fanfiction.net. At first I thought it was just a bug in Chrome, but this appeared hours ago on the ff.net blog:

    This new "feature" stops you from copying text from fanfiction.net's story content. Obviously it becomes much more difficult to provide targeted commentary on specific pieces of text if you can't easily copy/paste them any more.

    The source code for the stories is still visible and not at all obfuscated. Also, ff.net is maintaining access for the NVDA screen-reader [open source text-to-voice for the blind].

    Chrome v30.0.1599.69 m [ie. up to date]:
    • Highlighting is blocked.
    • Ctrl-A is blocked on story content, but not the summary at the top.
    • I tried disabling javascript, but highlighting was still blocked.

    Opera v12.16 [the last Presto version]:
    • Highlighting works. There's no evidence of copy protection. Javascript on.

    Internet Explorer 10.0.9200:
    • Highlighting is blocked.
    • If you start highlighting in the Summary section, then you can drag your cursor into the fic text and start highlighting the beginning of the fic. You can do something similar from the bottom of the fic. Not useful for mid-fic highlights.
    • Ctrl-A is blocked entirely. Even the story summary isn't highlighted.

    Firefox ? - I don't have it, so haven't tested it.

    Mobile browsers on Android.

    • Opera Mini Next - not blocked
    • Opera Mobile Next - Blocked
    • Android browser - not blocked

    Does anyone know how to circumvent this new feature, or if there's a simple extension I can use? I'm most interested in work arounds for Chrome on PC.
     
    Last edited: Oct 11, 2013
  2. Nuit

    Nuit Dark Lord

    Joined:
    Feb 14, 2010
    Messages:
    1,934
    Location:
    The Peach State
    If you have Tampermonkey or something similar, there's a little scrip for it. http://userscripts.org/scripts/show/179482

    Code:
    // ==UserScript==
    // @name     Fanfiction.net, make text selectable again
    // @include  http://www.fanfiction.net/*
    // @include  http://m.fanfiction.net/*
    // @grant    none
    // ==/UserScript==
    
    $(".nocopy").removeClass ("nocopy");
     
  3. wordhammer

    wordhammer Dark Lord DLP Supporter

    Joined:
    Feb 11, 2010
    Messages:
    1,916
    Gender:
    Male
    Location:
    In the wood room, somewhere flat
    Found a nifty extension for Firefox: RightToClick. It disables this type of java security when invoked. You can set the Options to always invoke on www.fanfiction.net,m.fanfiction.net so you won't need to manually activate it.

    The folks on Reddit have a few solutions that are more browser-independent.
     
    Last edited: Oct 11, 2013
  4. CosmosGravitation

    CosmosGravitation Professor

    Joined:
    Sep 27, 2006
    Messages:
    413
    This bookmarklet should enable all text selection. Put it in your bookmark bar and select it before copying.
     
  5. Rehio

    Rehio Bad Dragon ~ Prestige ~ DLP Supporter

    Joined:
    Jan 1, 2007
    Messages:
    367
    Location:
    New Mexico
    High Score:
    2588
    Huh, I didn't even know they'd put that on the site. I used to highlight text randomly as I read a while back. Guess I broke that habit.

    Also, yeah, that really sucks for actually quoting parts of the story in reviews. Not sure I agree completely with the decision, but I rarely do with FF.Net.
     
  6. Oz

    Oz For Zombie. Moderator DLP Supporter

    Joined:
    Jan 31, 2008
    Messages:
    9,028
    Gender:
    Female
    Location:
    Baile Átha Cliath
    I'll be removing the rules from the DLP stylish theme when I'm bothered to. I gave Zombie the fix I think. Could pester him for it. <.<

    Frankly it's a retarded 'feature' and shows just how completely fucking stupid the entire FFN staff really are. It completely fails to fix what, at the end of the day, is a complete non-problem.
     
    Last edited: Oct 12, 2013
  7. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Thank you. I installed it on Chrome and it works perfectly.
     
  8. Anarchy

    Anarchy Half-Blood Prince DLP Supporter

    Joined:
    Dec 12, 2009
    Messages:
    3,679
    Location:
    NJ
    I'm glad I'm not the only one who noticed this. I like to highlight paragraphs as I go along to hold my spot. Someone on irc told me that (in chrome) you right click, inspect element, and delete the part that says no_copy. It works, but only for that page, so something like the above link is good.
     
  9. Nae

    Nae The Violent

    Joined:
    Dec 16, 2010
    Messages:
    802
    Location:
    East India Company HQ
  10. Nuit

    Nuit Dark Lord

    Joined:
    Feb 14, 2010
    Messages:
    1,934
    Location:
    The Peach State
    Ugh, they changed something again. mgsaintz on TFF linked a userstyle that works.

    Code:
    @-moz-document domain(fanfiction.net)
    {
        /* This changes the css from their current setting of none to the normal setting of auto. */
        DIV#storytext.storytext.xcontrast_txt.nocopy,.storytextp {
            -webkit-touch-callout: auto !Important;
            -webkit-user-select: auto !Important;
            -khtml-user-select: auto !Important;
            -moz-user-select: auto !Important;
            -ms-user-select: auto !Important;
            user-select: auto !Important;
        }
    } 
    Edit: The previously linked userscript was updated as well.

    Code:
    // ==UserScript==
    // @name        Fanfiction.net, make text selectable again
    // @include     http://www.fanfiction.net/*
    // @include     http://m.fanfiction.net/*
    // @include     http://www.fictionpress.com/*
    // @include     http://m.fictionpress.com/*
    // @require     http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
    // @updateURL   https://userscripts.org/scripts/source/179482.meta.js
    // @downloadURL https://userscripts.org/scripts/source/179482.user.js
    // @version     2.1
    // @grant       GM_addStyle
    // ==/UserScript==
    
    $(".nocopy").removeClass ("nocopy");
    
    setInterval (fixInlineStyles, 999);
    
    function fixInlineStyles () {
        $("[style*='user-select']").each ( function () {
            var jThis       = $(this);
            var styleAttr   = jThis.attr ("style");
            styleAttr       = styleAttr.replace (/user-select:\s*none/g, "user-select: text");
            jThis.attr ("style", styleAttr);
        } );
    }
    
    GM_addStyle ( "                                 \
        * {                                         \
            -moz-user-select: text !important;      \
            user-select: text !important;           \
            -webkit-user-select: text !important;   \
        }                                           \
    " );
    
     
    Last edited: Oct 13, 2013
  11. Another Empty Frame

    Another Empty Frame Fake Flamingo DLP Supporter

    Joined:
    Apr 5, 2011
    Messages:
    197
    Gender:
    Male
    Location:
    Near Seattle
    High Score:
    1801
    as of yesterday morning (approx 18 hours ago I think) I haven't been able to highlight anything on my phone, very frustrating.

    Hopefully there will be a usable mobile fix soon :/
     
  12. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Is this affecting m.fanfiction addresses?

    Opera Mini definitely isn't affected yet, and I doubt it ever will be.

    If you want to maintain a more comprehensive browser experience, then you need to run userscripts with something like these: TamperMonkey for Android, Greasemonkey for Firefox on Android, OilCan: Greasemonkey on
    steroids for Android
    , Fat Ape, will do the trick.

    TamperMonkey and FatApe are complete browsers. OilCan I think runs on top of Android's native browser. Maybe. The site isn't really clear on that. Greasemonkey plugs into FireFox if you're using that already.

    Once you can run userscripts, grab ScriptKeeper's neat script which NuitTombee linked to earlier: http://userscripts.org/scripts/show/179482

    I think that'd work.

    edit: I found a three year old response on Stack Exchange with a better answer:

    Solution 1. Use Tampermonkey. Tampermonkey is more popular as an extension for Chrome, but it is also available as a standalone Android app. It functions as a lightweight browser, and allows you to manage and automatically run user scripts. Unfortunately it doesn't have many of the features found on other popular browsers, but it does support the Greasemonkey API.

    Solution 2. Use Opera Mobile, which has built-in support for userscripts, but no script management features, and doesn't support the Greasemonkey API. Navigate to the User Prefs section of opera:config, then tick "Always Load User JavaScript" and "User JavaScript". Enter the path to a folder (not a file) in the "User JavaScript File" field (I use /sdcard/userscripts/), then store the settings. Save your userscript in that folder with a .user.js extension. NB this works in OM12, but the OM14 beta doesn't seem to support userscripts at present.

    Solution 3. Launch your userscript manually via a bookmarklet or pasting this javascript directly into the browser address bar:

    Code:
    javascript:(function(){var a=document.createElement("script");a.src="http://path.to/myscript.user.js";document.head.appendChild(a);})();
    This technique is tedious, but the principle should work in most browsers. You don't get Greasemonkey API support though. The code above should work without modification in the stock Android browser, and can be saved as a bookmarklet. In Chrome Mobile the space in the var a needs escaping, i.e. var%20a=, and bookmarklets don't seem to work, so you have to paste manually every time.
    src.: http://android.stackexchange.com/qu...s-greasemonkey-scripts-on-the-android-browser
     
    Last edited: Oct 15, 2013
  13. Fatality

    Fatality Order Member

    Joined:
    May 4, 2011
    Messages:
    865
    Gender:
    Male
    Location:
    Australia
    Figured I wouldn't bother making a new thread as it's (kind of) related, but am I the only one getting a small box saying 'story content' popping up wherever the cursor is? It's annoying the hell out of me because it's pretty distracting when I'm trying to read.

    I tried disabling any add ons I had that could cause this and it's still there so I'm assuming it's some new "feature" of FF.net. Does anyone know how to get rid of this?
     
  14. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    It's not just you.
     
  15. Sauce Bauss

    Sauce Bauss Second Year ~ Prestige ~ DLP Supporter

    Joined:
    Apr 4, 2008
    Messages:
    61
    High Score:
    1411
    Just try throwing this into greasemonkey and it should take care of it.

    Only for DLP would I venture into the hole that is javascript. I've successfully avoided having to write any for years now. I hope you're happy.
     
    Last edited: Oct 24, 2013
  16. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Thanks TSoS. That was a cinch to throw into Tamper Monkey as a new script.
     
Loading...
Similar Threads
  1. Thaumologist
    Replies:
    8
    Views:
    4,020