From 1351910f6b410d9a0dc43da27e392f38a2d9d041 Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Sat, 1 Jul 2023 14:58:28 -0500 Subject: [PATCH] added styling for webtoons --- userscripts/style-webtoons.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 userscripts/style-webtoons.js diff --git a/userscripts/style-webtoons.js b/userscripts/style-webtoons.js new file mode 100644 index 0000000..85dac6d --- /dev/null +++ b/userscripts/style-webtoons.js @@ -0,0 +1,30 @@ +// ==UserScript== +// @name Style-Webtoons +// @namespace code.sitosis.com +// @version 1.0 +// @description Style Webtoons +// @author rudism +// @match https://webtoons.com/* +// @match https://www.webtoons.com/* +// @grant none +// @run-at document-end +// ==/UserScript== + +function injectStyle(css) { + var style = document.createElement('style'); + style.innerHTML = css; + var body = document.getElementsByTagName('body'); + if(body.length > 0) { + body[0].appendChild(style); + } +} + +(function () { + 'use strict'; + injectStyle(` +.viewer_lst .viewer_img img._images { + max-width: 300px; + min-width: 300px; + height: auto; +}`); +})();