Skip to content

Instantly share code, notes, and snippets.

@nhtua
Created June 25, 2018 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhtua/0cc2d5cc1d590d383b6df0c52c600762 to your computer and use it in GitHub Desktop.
Save nhtua/0cc2d5cc1d590d383b6df0c52c600762 to your computer and use it in GitHub Desktop.
Make truyenfull.vn easy reading
// ==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