Created
June 25, 2018 05:39
-
-
Save nhtua/0cc2d5cc1d590d383b6df0c52c600762 to your computer and use it in GitHub Desktop.
Make truyenfull.vn easy reading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Easy read TruyenFull.Vn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://truyenfull.vn/*/chuong-*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Your code here... | |
addFont('https://fonts.googleapis.com/css?family=Spectral:400,400i&subset=vietnamese'); | |
var chapter = document.querySelector('div.chapter-c'); | |
chapter.style.width = "720px"; | |
chapter.style.margin = "0 auto"; | |
chapter.style.fontFamily = "'Spectral', serif"; | |
chapter.style.fontSize = "26px"; | |
function addFont(url){ | |
var link = document.createElement('link'); | |
link.setAttribute('rel', 'stylesheet'); | |
link.setAttribute('type', 'text/css'); | |
link.setAttribute('href', url); | |
document.head.appendChild(link); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment