Skip to content

Instantly share code, notes, and snippets.

@LaFr4nc3
Last active November 22, 2019 16:16
Show Gist options
  • Save LaFr4nc3/016e248dc312fde3395e62d797d280b4 to your computer and use it in GitHub Desktop.
Save LaFr4nc3/016e248dc312fde3395e62d797d280b4 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name AA Font Changer
// @namespace https://0x9.pw
// @version 1.0.3
// @description Change AA font
// @author LaFr4nc3
// @match ://yaruoank.jp/*
// @match ://yanchor.blog.fc2.com/*
// @match ://yaruokei.blog.fc2.com/*
// @match ://oyoguyaruo.blog72.fc2.com/*
// @match ://mukankei151.com/*
// @match ://yaruomatome.blog10.fc2.com/*
// @match ://chronoyaruo.blog.fc2.com/*
// @match ://gokumonan.blog87.fc2.com/*
// @match ://himanatokiniyaruo.com/*
// @match ://www.yaruyomi.com/*
// @match ://yarucha.blog.fc2.com/*
// @match ://yarupon.blog134.fc2.com/*
// @match ://moremoreyaruo.blog.fc2.com/*
// @match ://yaruoshelter.com/*
// @match ://theateryaruo.blog71.fc2.com/*
// @match ://yaruo.wikia.com/*
// @match ://yaruobookshelf.jp/*
// @match ://rusalka777.blog.fc2.com/*
// @match ://burakio002.blog97.fc2.com/*
// @match ://yaruowohiroiyomi.blog.fc2.com/*
// @grant GM_addStyle
// @require https://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
(function() {
'use strict';
const css = '{ font-family: "Meiryo mod 12pt AA" !important; }';
const elements = new Map([
['yaruoank.jp', 'div.mainEntryBase'],
['yanchor.blog.fc2.com', 'div.ently_text'],
['yaruokei.blog.fc2.com', 'div.entry_body'],
['oyoguyaruo.blog72.fc2.com', 'div'],
['mukankei151.com', 'div.textar-aa'],
['yaruomatome.blog10.fc2.com', 'dd'],
['chronoyaruo.blog.fc2.com', 'div.aa'],
['gokumonan.blog87.fc2.com', 'div.ently_text'],
['himanatokiniyaruo.com', 'dd'],
['www.yaruyomi.com', 'article.aa'],
['yarucha.blog.fc2.com', 'dd.aaExist'],
['yarupon.blog134.fc2.com', 'div.aa'],
['moremoreyaruo.blog.fc2.com', 'div.aa'],
['yaruoshelter.com', 'dd'],
['theateryaruo.blog71.fc2.com', '.AA dd'],
['yaruo.wikia.com', 'p'],
['yaruobookshelf.jp', 'dd'],
['rusalka777.blog.fc2.com', 'div.article'],
['burakio002.blog97.fc2.com', 'span.aa'],
['yaruowohiroiyomi.blog.fc2.com', 'dd']
]);
function addStyle (element) {
GM_addStyle(element + ' ' + css);
}
// Main routine
if (elements.get(document.domain) !== undefined) {
addStyle(elements.get(document.domain));
}
if (document.domain === 'yarucha.blog.fc2.com') {
setTimeout(function() {
$('dd.aaExist').css({'cssText': 'font: 16px/18px;'});
}, 1000);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment