Kumirei's Userscripts

Thanks! I have updated the include statement

1 Like

You need to remove the first one too, since now it even triggers on the forums!

1 Like

Haha, yeah, I noticed! Already fixed

Finally came back to this and did try taking those lines out, but there’s no response.

I’ve also tried removing certain scripts, trying only one at a time, etc, and all your scripts seem to universally give the same issues. I do wonder if this means it’s something to do with Discourse rather than Safari. Userscripts, at least, use a bit more verbose than Tampermonkey and does provide and attempt to use a fallback injection method, but that appears to fail for a different reason, alas.

1 Like

Are there any other script handlers for Safari that you could try?

1 Like

I’ve only tried TamperMonkey and Userscripts, the two most common ones. I’m aware of PageExtender and I’m currently downloading Xcode (it’s $5 on the AppStore or free from source) and will try it if I get a chance. I see an issue on their Github page about CSP errors on some sites though too which makes me think this might ultimately be an issue with how Safari handles CSP on Discourse rather than any particular script issue.

It appears this has been an issue for a while, judging by CSP preventing user script on Wanikani Community page in 2019

1 Like

There’s some indication that it’s Safari mishandling CSP strictness on sites.

image

3 Likes

Ah, that’s poop

A slightly different problem, when I visit the forums I’m seeing TypeError: $ is not a function errors in the console for WaniKani Forums: {Large Image Embedder,Expand Tall Images,Like counter} (the first two call traces via a function called search and the latter one called add_CSS (none of them seem to be working).

I’ve also got a similar ReferenceError: $ is not defined from two other scripts (not yours) so I’m hoping there’s a common solution. Presumably they’re expecting also jQuery to be available as $?

1 Like

Oh, you’re seeing an actual error in the console? That’s not supposed to happen. I will look into it when I get the time!

1 Like

I’m half expecting it to be “Will hasn’t installed some dependency”, and I’m not super dependent on them, so no rush!

1 Like

I just downloaded the Regular Tracker, where do I see my stats? sorry, I’ve used it before but I have completely forgotten.

1 Like

Should appear at the bottom of the header

1 Like

Oh, I’m just blind, thank you!

1 Like

I am not able to replicate this. You’re seeing these errors in the console, and not in the editor, correct? What browser are you using?

Firefox 99.0.1

Scripts loading:
Wanikani: Golden Burn
Wanikani: SRS Distribution Charts
Wanikani Forums: Bottled WaniMeKani
Wanikani Forums: Large Image Embedder
Wanikani Forums: Expand Tall Images
Wanikani Forums: Emoter
Wanikani Forums: Spongebob Time Cards
Wanikani Forums: Like counter
Wanikani Forums: 10chars

This time I noticed two lines that appear to related to CSP blocking something (but I can’t see what is affected). those still appear even if I disable all the matched scripts.

messages from Console tab of Developer Tools
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src"). moz-extension:1:5003
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src"). moz-extension:33:9
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. 442
ReferenceError: $ is not defined
    VMin09ng05fo8 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Golden Burn.user.js#20:95
    VMin09ng05fo8 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Golden Burn.user.js#20:97
    VMin09ng05fo8 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Golden Burn.user.js#20:98
    a moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/injected-web.js:1
Wanikani Golden Burn.user.js:98:28
ReferenceError: $ is not defined
    VMin0b4q4w2kv moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani: SRS Distribution Charts.user.js#54:14406
    VMin0b4q4w2kv moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani: SRS Distribution Charts.user.js#54:14538
    VMin0b4q4w2kv moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani: SRS Distribution Charts.user.js#54:14539
    VMin0b4q4w2kv moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani: SRS Distribution Charts.user.js#54:14539
    a moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/injected-web.js:1
Wanikani: SRS Distribution Charts.user.js:14539:32
TypeError: $ is not a function
    search moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:70
    waitForSelector moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:35
    VMin06f2lknrf moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:107
    VMin06f2lknrf moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:108
    VMin06f2lknrf moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:109
    VMin06f2lknrf moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Large Image Embedder.user.js#36:109
    a moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/injected-web.js:1
WaniKani Forums: Large Image Embedder.user.js:109:32
TypeError: $ is not a function
    search moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:70
    waitForSelector moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:35
    VMin08xjy8m22 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:92
    VMin08xjy8m22 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:112
    VMin08xjy8m22 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:113
    VMin08xjy8m22 moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ Wanikani Forums: Expand Tall Images.user.js#38:113
    a moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/injected-web.js:1
Wanikani Forums: Expand Tall Images.user.js:113:32
TypeError: $ is not a function
    add_CSS moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Like counter.user.js#48:266
    VMin021bwhr0f moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Like counter.user.js#48:49
    VMin021bwhr0f moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Like counter.user.js#48:325
    VMin021bwhr0f moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/ WaniKani Forums: Like counter.user.js#48:326
    a moz-extension://b776c7d5-41be-41e1-899c-b6fe7ccabb54/injected-web.js:1
WaniKani Forums: Like counter.user.js:326:28
TypeError: $ is not a function 2 sandbox eval code:89:27
Error: Promised response from onMessage listener went out of scope 
1 Like

Which script handler are you using?

Hey! i know this isnt really the place to do this, but i wanted to make a post, but cant seem to find out how to do so! can anyone help me with this? i saw the “reply” button and took my chance to write in here lol
srry for bothering you guys

1 Like

No problem!

You can either go to a category and hit NEW TOPIC or press C anywhere

ViolentMonkey.

Out of curiosity, what scripts do you have installed for the forums? Do any of those import jQuery?