novelupdates Cover Preview

Previews covers in novelupdates.com when hovering over hyperlinks that lead to novel pages.

As of 2020-12-13. See the latest version.

Author
sz
Ratings
0 0 0
Version
1.8.3
Created
2017-01-11
Updated
2020-12-13
Size
70.4 KB
License
http://creativecommons.org/licenses/by-nc-sa/4.0/
Applies to

Popup which gets displayed on hovering over serie titles on novelupdates.com. Tested for index/group/reading list/user list/forum and indiviudal serie pages.
Cover image links getting pulled from each individual serie page.

minimum needed changes to use it on other sites:

  • change adresses in meta
    // @include https://www.novelupdates.com/*
    // @include http://www.novelupdates.com/*
  • INDIVIDUALPAGETEST: string for include() to match target serie pages
  • IMAGELINKCONTAINERS: Search for imagecontainer class where the cover is displayed
  • CONTAINERNUMBER: in case that imagecontainer class is used multiple times write the count in which container shows the cover
  • IMAGEBLOCKER:If you want to exclude specific images. Needs to match includes()
  • optional additional details settings for:
    seriePageTitle, seriePageVotes, seriePageStatus, seriePageGenre, seriePageTags

  • available settings:
    //#region frontend settings
    const MAXCACHEAGE = 90 * 24 * 60 * 60 * 1000; // Max Age before Cached data of serieinfo gets overridden with current data. Max Age is 90 days in milliseconds //days * h * min * sec * ms
    const DEFAULTTITLEBACKGROUNDCOLOR = "#2c3e50"; //if no hijack class style available use plain color
    const DEFAULTBACKGROUNDCOLOR = "#ccc"; //if no hijack class style available use plain color
    let STYLESHEETHIJACKFORBACKGROUND = ".l-canvas, .breadcrumb"; //if unknown set empty ""; classname with leading dot seperated with comma
    let STYLESHEETHIJACKFORTITLE = ".widgettitle_nuf, .navTabs "; //if unknown set empty ""; classname with leading dot seperated with comma

    const PREDIFINEDNATIVTITLE = "Recommended by"; //forum, index
    const INDIVIDUALPAGETEST = "www.novelupdates.com/series/"; //matched with includes
    const IMAGELINKCONTAINERS = ".serieseditimg img, .seriesimg img"; //instead of single element class name with dot seperated with comma
    const IMAGEBLOCKER = "https://www.novelupdates.com/img/noimagefound.jpg"; //tested with includes()
    const CONTAINERNUMBER = 0;
    const seriePageTitle = ".seriestitlenu";
    const seriePageVotes = ".seriesother > .uvotes";
    const seriePageStatus = "#editstatus";
    const seriePageGenre = "#seriesgenre";
    const seriePageTags = "#showtags";
    const isOnIndex =
    this.location.href == "https://www.novelupdates.com/" ||
    this.location.href.startsWith("https://forum.novelupdates.com/") ||
    this.location.href.startsWith("https://www.novelupdates.com/?pg=") ||
    this.location.href.startsWith("https://www.novelupdates.com/group/"); //popup style next to container instead of next to linkitem
    const isOnReadingListIndex = this.location.href.startsWith(
    "https://www.novelupdates.com/user/"
    );
    const targetContainerIDToObserve = "profile_content3"; //update eventlistener on list change of page isOnReadingListIndex

    const preloadUrlRequests = true; //load serie page info and collect coverData
    const preloadImages = false; //preload images during collecting of coverData
    const eventListenerStyle = 0; //undefined/0 = forEach serieLink addeventlistener(mouseenter/mouseleave) / 1 = window addeventlistener(mousemove)
    //to know when to switch between popup next to link or next to container of link
    //#endregion

    Example changes for mangaupdates
    https://greasyforks.org/scripts/26513-mangaupdates-cover-preview

    长期地址
    遇到问题?请前往 GitHub 提 Issues。