What needs to be done in order to make Dark Reader work as a UserScript?

Can't say for sure since you didn't give a target to test against but I don't see GM_addStyle used either in the primary top level script nor the current @required library... so possibly try some code improvements of:

--- /scripts/wenhairu/Dark_Mode/source@1.0.0+a6a8e07
+++ /scripts/wenhairu/Dark_Mode/source
@@ -2,7 +2,7 @@
 // @name        Dark Mode
 // @namespace   darkreader.org
 // @match       *://*/*
-// @grant       GM_addStyle
+// @grant       none
 // @icon        https://p.pstatp.com/origin/ff740000b3f19de1691e
 // @version     1.0.0
 // @author      wenhairu
@@ -11,4 +11,6 @@
 // @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
 // ==/UserScript==
 
-DarkReader.auto({brightness:100,contrast:90,sepia:10});
\ No newline at end of file
+/* globals DarkReader */
+
+DarkReader.auto({brightness:100,contrast:90,sepia:10});

I would also give it a whirl in Greasemonkey (GM) itself with Firefox. Presuming that you are using Chrome, Tampermonkey (TM) and Violentmonkey (VM) do things slightly different inside the extension. If you need to test older GM you may try SeaMonkey with Greasemonkey Port (GM Port).

Good luck.

// @name        Dark Mode
// @namespace   darkreader.org
// @match       *://*/*
// @grant       none
// @icon        https://p.pstatp.com/origin/ff740000b3f19de1691e
// @version     1.0.0
// @author      wenhairu
// @require     https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
// ==/UserScript==
 
/* globals DarkReader */

DarkReader.auto({brightness:100,contrast:90,sepia:10});

Re: @sjehuda:

I'm using Falkon.

Assuming Falkon still has debugging try that.

I've also tried with FF.

Do Ctrl+Shift+J for the Browser Console and click the gear icon in the far upper right to ensure that all items are ticked on esp. Show content message. Then ensure that Errors and Warnings are selected to the left and any other item you wish to debug.

The library that it uses for the @require, as you probably know, is at https://www.npmjs.com/package/darkreader . Once you have done the minimum steps for debugging to determine if there errors specific to that script (try running only that .user.js too) showing up then you could possibly go to the repo referenced at npmjs. As far as the top level script goes, esp. since it is so small i.e. a stub loader, I don't see anything else that can improve the .user.js any further.

If all the browsers fail it's possible there's something at the target site you are trying to apply it to that prevents script injection too. Manual injection isn't the same as a .user.js injection (different permissions in every browser usually).

Again Good luck.

Solved with .enable

- DarkReader.auto({brightness:100,contrast:90,sepia:10});
+ DarkReader.enable({brightness:100,contrast:90,sepia:10});
```