From 7f45a5e40128aadf02fe598310d40fca850a8e1f Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Fri, 29 Sep 2017 19:01:39 +0100 Subject: Manually inject custom user CSS into our own frames/pages --- lib/dom_utils.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 65a14c34..32d402df 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -407,5 +407,13 @@ DomUtils = windowIsTooSmall: -> return window.innerWidth < 3 or window.innerHeight < 3 + # Inject user styles manually. This is only necessary for our chrome-extension:// pages and frames. + injectUserCss: -> + Settings.onLoaded -> + style = document.createElement "style" + style.type = "text/css" + style.textContent = Settings.get "userDefinedLinkHintCss" + document.head.appendChild style + root = exports ? window root.DomUtils = DomUtils -- cgit v1.2.3