novelupdates Cover Preview

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

目前為 2020-12-10 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
sz
評價
0 0 0
版本
1.8.0
建立日期
2017-01-11
更新日期
2020-12-10
尺寸
62.6 KB
授權條款
http://creativecommons.org/licenses/by-nc-sa/4.0/
腳本執行於

Popup which gets displayed on hovering over serie titles on novelupdates.com. Tested for index/group/reading list/user list 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://greasyfork.org/scripts/26513-mangaupdates-cover-preview