[Userscript] Forum: IME2Furigana

No popup, I even went into my settings to allow the pop-up for the forum. But might be better to try something different than a popup if possible because I’m not sure how friendly Safari is to pop ups natively. (Although to be fair, I know just enough about stuff like this to have even stupider ideas than someone who knows nothing. :joy: )

Btw, I have restarted safari between each script install and refreshed to make sure it didn’t just load a little wonky.

1 Like

You can also try this one:

// ==UserScript==
// @name         IME2FuriganaDebug
// @namespace    ime2furiganadebug
// @version      1.8
// @description  Adds furigana markup functionality to Discourse. When inputting kanji with an IME, furigana markup is automatically added.
// @author       Sinyaven
// @license      MIT-0
// @match        https://community.wanikani.com/*
// @grant        none
// ==/UserScript==

document.body.style.setProperty("--tertiary", "red");

It should turn the reply box red:

2 Likes

It is still very much blue. Was that really all the code needed? (Only one line?)


I’ve also found all my content blockers and turned them off for this site. Although considering all my scripts work on the main site with my content blockers on, I’m not sure they are the problem…

Edit:

These are the scripts I have on the main site

1 Like

And are you absolutely certain that you have refreshed the page? I cannot think of any reason why this basic script does not work on the forums, while your other scripts on the main site do work.

Refreshed, restarted Safari. I can try restarting my computer if you think it’ll make a difference. And I have no idea either.

I don’t think restarting will do anything.

You said that the golden burn script works on the forums – but does it really? If it actually works, the badge should look like this:
image
and if it does not work, the badge will look like this:
image

2 Likes

I thought it was working, but you are right, it looks like the second even when the script is on.

1 Like

At this point I think the problem is probably in Tampermonkey. Do you have all adblockers disabled? Or even better, all browser extensions except for Tampermonkey?

I turned off all adblockers. The only extension beyond Tampermonkey that I’ve had on was Safarikai, but I just tried with that turned off, and still nothing.

1 Like

And if you open the Tampermonkey popup, you see that it is enabled and IME2FuriganaDebug is running?

image

And the URL you are on definitely starts with https://community.wanikani.com/?

Unfortunately, I’m running out of ideas what the problem might be – I think it is most likely a problem with Tampermonkey.

1 Like

Yeah, all that is true.

Thank you so much for trying so hard to help me. It is so weird that scrips just doesn’t seem to work on community.wanikani.com when all my scripts for wanikani.com works fine.

If it wasn’t so convenient to use Safari with Mac, I would consider other browsers that are more supported (generally), but it works so smoothly since I own a lot of apple products…

2 Likes

()()()().

Sorry, just monkeying around! :slight_smile: I hope that you get this working.

1 Like

How about

// ==UserScript==
// @name         IME2FuriganaDebug
// @namespace    ime2furiganadebug
// @version      1.8
// @description  Adds furigana markup functionality to Discourse. When inputting kanji with an IME, furigana markup is automatically added.
// @author       Sinyaven
// @license      MIT-0
// @match        https://community.wanikani.com/*
// @run-at      document-start
// @grant        none
// ==/UserScript==

document.body.style.setProperty("--tertiary", "red");

It should turn the reply box red:
image

That actually doesn’t work for me, because with // @run-at document-start, Tampermonkey runs the script before document.body exists :laughing:

Then, set a MutationObserver.

I am trying to check if single thread of JavaScript crashed at some point, therefore everything after it stops to run.

Nothing changes and no new errors pop up.

How about:

// ==UserScript==
// @name         IME2FuriganaDebug
// @namespace    ime2furiganadebug
// @version      1.8
// @description  Just for debugging.
// @author       Sinyaven
// @license      MIT-0
// @match        https://*/*
// @match        http://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

console.log("IME2FuriganaDebug running");
domReady().then(() => document.documentElement.style.setProperty("--tertiary", "red"));

function domReady() {
	return new Promise(resolve => {
		if (document.readyState === "interactive" || document.readyState === "complete") resolve();
		else document.addEventListener("readystatechange", resolve, {once: true});
	});
}

Copy and paste this code into a Tampermonkey script, save the script, go to [Userscript] Forum: IME2Furigana - #115 by Sinyaven, and force refresh the page (CMD+OPTION+R). This should again change the reply button to red, and also display the message “IME2FuriganaDebug running” in the console.

Afterwards, you should delete the script or replace it with one of the previous versions, because this version injects into every webpage you are visiting, not just https://community.wanikani.com.


You could also try a different userscript manager than Tampermonkey – Greasy Fork suggests Userscripts as an alternative.

1 Like

Actually, it should show an error like this, even if it fails.

I am on mobile right now, so can’t really test properly, but I use ViolentMonkey + Kiwi Browser, to run scripts on mobile.

@Sinyaven Yeah, still nothing. :confounded: I guess I could try Userscripts and just the forum scripts to see if they load then. Will take a little bit.

@polv I guess nothing runs at all then? Since I got no errors.

2 Likes

<振>[ふ]り<仮名>[が], babe (being cheeky, excuse me :joy:) it works with userscripts

EDIT: Well, it made the format, but I don’t see the furigana…

2 Likes