Skip to content

Instantly share code, notes, and snippets.

@kacpak
Last active June 3, 2022 17:19
Show Gist options
  • Save kacpak/ec403a5ee39df48fddaaa5e9b3df1e95 to your computer and use it in GitHub Desktop.
Save kacpak/ec403a5ee39df48fddaaa5e9b3df1e95 to your computer and use it in GitHub Desktop.
Gives background to images to recognise what is still loading to not miss pages
// ==UserScript==
// @name See loading manga images
// @namespace Violentmonkey Scripts
// @match *://*/*
// @grant none
// @version 1.0
// @author Mateusz Kasprzak
// @downloadURL https://gist.githubusercontent.com/kacpak/ec403a5ee39df48fddaaa5e9b3df1e95/raw
// ==/UserScript==
const styles = `
.wp-manga-chapter-img::after {
content: '';
background: red;
height: 50px;
width: 50px;
display: block;
margin-bottom: 10px;
border: 1px dashed #333;
}
.wp-manga-chapter-img:not(.lazyloaded) {
background: #f0f0f0 !important;
min-height: 50px !important;
min-width: 50px !important;
display: block !important;
border-bottom: 1px dashed #333 !important;
}
.chapter-type-manga .c-blog-post .entry-content .entry-content_wrap .reading-content::before {
content: none;
}
`
const style = document.createElement('style');
style.textContent = styles;
document.head.append(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment