Reading preferences in AnkiWebView

I’m working at implementing a toggle for the middle click to paste feature on Linux.
I have to modify the code here, but as it currently is, there’s no way to read the user’s preferences from AnkiWebView.
Looking at other code, it seems I need to add a mw: AnkiQt parameter to the constructor to access anki.collection.Collection and alter every call to it.
I’m wondering if a such a pull request would be accepted or if it would be too much, or if maybe there’s another way to implement it that I haven’t realized.

1 Like