您好,游客!

您好,新朋友。点击以下按钮加入我们!

Fix for AO3's Entire Work mode.

About: FanFictionNavigator

Currently, AO3's hide feature doesn't handle an exception for Entire Work mode. So for example, if you set Liker Options to Hide Like, div.ffn_like_fic of Entire Page would be hidden.

My suggestion.

var Story = function(optionsin) {
    a["archiveofourown.org"] = {
        hide:function(){
            if (patharr[3]!=="chapters" && window.location.search.indexOf("?view_full_work=true")==-1) {
                _this.hide();
            }
        }
    }
}

By the way, I have a question.
In Fanfiction.net, Liker Option appears in author page, but show/hide feature doesn't work.
In AO3, Liker Option doesn't appear in author page, but show/hide feature works.

What is your design for author page? Liker Option has more options other than show/hide feature, but it's best to handle Liker Option and show/hide feature as a set to avoid confusion.

评论

  • 最后编辑于 January 14 [?]

    Hi, added this and uploaded v.43, seems to be working.

    About author page - not hiding any fic on author page was a deliberate decision on my part. I just didn't implement it on AO3 because I don't visit it very often.
    I use it to always see how many author's fics I already like or dislike (and switching hide options on/off to do that is cumbersome). If I already dislike most and like none of his fics then I should just hide the author and stop seeing his new fics.
    If you really dislike this I can add a separate option for that or just implement the same behavior for AO3 author pages.

  • Thank you for an update and taking time to write a response.

    Sorry, my test wasn't complete, I noticed that in AO3, FFN also hide div.ffn_like_fic of single chapter work.

    New fix

    var Story = function(optionsin) {
        a["archiveofourown.org"] = {
            hide:function(){
                if (patharr.length > 3 && patharr[1] !== "users" && patharr[3] !== "chapters") {
                    _this.hide();
                }
            }
        }
    }
    

    Several days ago, I read a really disliked story and FFN didn't hide the story in author page, so I was puzzled and frustrated.
    But your idea to determine to dislike author by a number of disliked story doesn't work when FFN hides stories in author page. Now I calmed down, your design for author page is fine to me.

    Fix to add Liker Option to author page.

        case "archiveofourown.org":
            // hide/show options
            ffn$('div.navigation.actions.module, div.primary.header.module').after(
    
  • 最后编辑于 January 14 [?]

    Done that in v.44, please check it. I tested in all three modes (single/multi-chapter and entire work)
    I just changed it all to regexp and disabled hiding on any /works/(\d+) urls, I think this should work for all possible single fic pages (unless there are some pages that begin with something other than /works/)

  • patharr[2] is undefined in
    https://archiveofourown.org/works/search?utf8=✓&work_search[query]=

            hide:function(){
                if (patharr[1] !== "users" &&    // do not hide fic on author pages (to clearly see how many fics you like and dislike)
                    !/(collections\/[^\/]+\/)?works\/\d+/.test(window.location.pathname)) { // do not hide fic header on reading pages
                    _this.hide();
                }
            }
    
  • Yeah, thanks.
    Changed that check to your variant, see it in v.45

  • Looking good!

登录注册后才能评论。