From 52203aaf54d908d97443f613926188fb4d7e1790 Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 22 Feb 2023 15:52:05 +0000 Subject: [PATCH] Add 'css/custom-css.js' --- css/custom-css.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 css/custom-css.js diff --git a/css/custom-css.js b/css/custom-css.js new file mode 100644 index 00000000..cf019cf5 --- /dev/null +++ b/css/custom-css.js @@ -0,0 +1,17 @@ +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later + +const css = localStorage.getItem("poke-custom-css"); + +var head = document.head +var style = document.createElement('style'); + +head.appendChild(style); + +style.type = 'text/css'; + +if (style.styleSheet){ + // This is required for IE8 and below. + style.styleSheet.cssText = css; +} else { + style.appendChild(document.createTextNode(css)); +} \ No newline at end of file