Skip to content

Instantly share code, notes, and snippets.

@Gkjsdll
Last active April 13, 2022 16:43
Show Gist options
  • Save Gkjsdll/731fb249a02f5cc4a63da464808f5b2f to your computer and use it in GitHub Desktop.
Save Gkjsdll/731fb249a02f5cc4a63da464808f5b2f to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Comics visited link styling
// @namespace http://tampermonkey.net/
// @version 0.0.10
// @description Style visited links on multiple comic sites.
// @author Zack (Gkjsdll) Winchell
// @icon https://i.imgur.com/mBU8lYf.png
// @noframes
// @match *://alpha-scans.org/*
// @match *://www.alpha-scans.org/*
// @match *://www.asurascans.com/*
// @match *://edelgardescans.com/comics/*
// @match *://flamescans.org/*
// @match *://imperfectcomic.com/*
// @match *://leviatanscans.com/*
// @match *://lhtranslation.net/*
// @match *://luminousscans.com/*
// @match *://mangakakalot.fun/*
// @match *://manganelo.com/chapter/*
// @match *://methodscans.com/comics/*
// @match *://mm-scans.org/*
// @match *://reader.pmscans.com/*
// @match *://reaperscans.com/*
// @match *://skscans.com/*
// @match *://zeroscans.com/*
// ==/UserScript==
(function() {
'use strict';
const styles = {
'alpha-scans.org': `
.bsx > a:visited .epxs {
color: #bb0000 !important;
}
`,
'asurascans.com': ``,
'edelgardescans.com': ``,
'flamescans.org': ``,
'imperfectcomic.com': `
.chapter-item a:visited {
color: #777 !important;
}
`,
'leviatanscans.com': `
.wp-manga-chapter a:visited,
.chapter-item a:visited {
color: #777 !important;
}
`,
'lhtranslation.net': `
.chapter-item a:visited {
color: #777 !important;
}
`,
'luminousscans.com': `
a:visited .chapternum {
color: green;
}
`,
'mangakakalot.fun': `
a.text-secondary:visited, a:visited span.text-secondary {
color: #659ACC !important;
}
`,
'manganelo.com': ``,
'methodscans.com': ``,
'mm-scans.org': `
.chapter a:visited {
color: #7A12E2 !important;
}
.wp-manga-chapter a:visited {
color: #666 !important
}
`,
'pmscans.com': `
.bsx > a:visited .epxs {
color: #777 !important;
}
`,
'reaperscans.com': `
.info a:visited,
.series-content a:visited {
color: #777 !important;
}
`,
'skscans.com': `
.chapter-item a:visited {
color: #777 !important;
}
`,
'zeroscans.com': `
a:visited * {
color: #FF3333 !important;
}
`,
};
const getDomain = () => {
const regExp = /^(?:.*\.){0,1}(.*\..*)$/;
const hostname = window.location.hostname;
const domain = hostname.match(regExp)[1];
return domain;
}
function addStyle(styleContent) {
const style = document.createElement('style');
style.textContent = styleContent;
document.documentElement.appendChild(style);
}
addStyle(styles[getDomain()]);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment