From 33f293120d1e43c52e24709ad5f7f0e3189cf0ee Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Wed, 28 Jul 2021 08:10:31 -0400 Subject: [PATCH] API.md: document need to use CSS "!important" keyword (fix #1264) --- API.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index c76bbfd..30bab46 100644 --- a/API.md +++ b/API.md @@ -659,9 +659,11 @@ Example `shortcuts.json` for `https://deezer.com` & `https://soundcloud.com` to --inject ``` -Allows you to inject javascript or css files. This command can be repeated multiple times to inject multiple files. +Allows you to inject JavaScript or CSS files. This command can be repeated multiple times to inject multiple files. -_Note:_ The javascript file is loaded _after_ `DOMContentLoaded`, so you can assume the DOM is complete & available. +_Note about JS injection:_ injected JS is loaded _after_ `DOMContentLoaded`, so you can assume the DOM is complete & available. + +_Note about CSS injection:_ to override existing CSS rules, you need to use the `!important` CSS keyword. Example: `#id_to_hide { display: none !important; }` , not just `#id_to_hide { display: none; }` . Example: