Greasy Fork is available in English.

novelupdates Cover Preview

Previews covers in novelupdates.com when hovering over hyperlinks that lead to novelupdates seriepages and a few external pages.

脚本作者
sz
今日安装
0
总安装量
361
得分
3 0 0
版本
2.6.0
创建日期
2017-01-11
最近更新
2021-03-01
许可证
http://creativecommons.org/licenses/by-nc-sa/4.0/
应用到

novelupdates thread: https://forum.novelupdates.com/threads/novel-updates-userscript-to-preview-cover-images-on-greasyfork.117240/

shows a popup when hovering over serie titles on novelupdates.com. Tested for index/group/reading list/user list/forum and individual serie pages.

Cover image data getting pulled from link one time for each individual serie page and textinformation cached for 90days/or until update(and save data) version change

Can also display cover previews from external links if available (current externalLinks: www.scribblehub.com, www.webnovel.com, royalroad.com, bato.to, mtlnovel.com, mydramalist.com, wiki.d-addicts.com, www.imdb.com, royalroadl.com, mangadex.org, www.tvmaze.com/shows/)

Can be ported to another site by changing the frontend settings. If externalLink of site available, internalLink can be directly replaced. Otherwise need to lookup the selector of the corresponding site.

additional changes inside the frontend settings for better site compatibility:

let STYLESHEETHIJACKFORBACKGROUND = " .l-submain, .breadcrumb"; //if unknown set empty ""; classname with leading dot seperated with comma  //.pageContent
//index: l-submain;forum: breadcrumb;
let STYLESHEETHIJACKFORTITLE = ".widgettitle_nuf, .navTabs "; //if unknown set empty ""; classname with leading dot seperated with comma
//index: widgettitle_nuf; forum:navTabs
const PREDIFINEDNATIVTITLE = "Recommended by"; //forum, index
const targetContainerIDArrayToObserve = [
  "profile_content3",
  "messageList",
  "myTable",
];
/*
observer needed for ajax changed page data. (here personal readinglist tab change and in the forum a quickedit of a post)
  update eventlistener on content change if element id found: isOnReadingListIndex [#profile_content3], in forum[#messageList] and on index[myTable] on tablesorting
  Attach container to a MutationObserver function which refreshes the eventlistener on links to seriepages
*/

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

complete feature set

  • after first fetch caches textdata and coverimage link for 90 days or when a dataversion changes happens. (90 days should be a nice compromise to get fresher data for ratings/tags and chapter counts)
  • preloading rate limitation (currently set to one query per domain after 0.5seconds)

  • should show a coverPreview everywhere on novelupdates.com and forum.novelupdates.com

  • css from main/forum page selected for automatic (dark) theme support.

  • coverPreview script will fetch a target link. If it is not in cache it tries to get coverimage link, title, description, rating, status, genre and tags

  • externalLinks currently prepared: mangaupdates.com, www.scribblehub.com, www.webnovel.com, www.royalroad.com, bato.to and mangadex.org

  • externalLinks(not to novelupdates) will display the popup with a red border and an additional link icon infront of the title (on first display of an external link tampermonkey will ask to allow access to the external sites)

  • description and more information from tags are only visible on the detailed styled version (switch between detailed and simple version with [key 1]

  • [key 2] will switch between description and other tags

  • simple styled popup will have reduced information available (rating[number + ★], chapter count, status icon[ongoing ✎/completed 🗹 ])

  • the popup can be switched to a smaller sized version [key 3]

  • in case of overflowing description/tags they will be autoscrolling which can be paused with [key 4]

  • if there are outdated information in a coverPreview you can reload only the current data with [key 5] or reset all data as it was at the install time. Currently cover text information and link to coverimage will be stored for 90 days.

  • [key 6] reload all coverData for links of the current page

  • [key i] activates preloading/loading state icon

  • ReadingListIcon and Title can be activated with [Key P]

  • while pressing [key H] the hotkey allocation will be shown.