Must you change your local javascript file name for any updates to that file to be synced?

Hello, I have followed the format provided in hkr’s answer titled “Any way to repeat the same HTML over many cards similarly as you import CSS, so I can more easily change it later?” for a local javascript file starting with ‘_’ which I have placed in collection.media folder.

It synced initially with the deck. But it’s clearly not ever updating during sync. I’ve tested it simply and blatantly to rule out other issues and it’s clearly not updating the file in sync.

Am I meant to change the name of the file like _filename.js _filename_001.js _filename_002.js to handle updates?

That is really janky but works so is what I am doing for now. It does, however, mean updating a lot of cards that share the same code to these new _### references and I was trying to save from such manual tediousness

I suspect that I could delete the javascript file on my phone and have it override on sync as new when needed (for Ankidroid) but that wouldn’t help Ankiweb

You can trigger a sync manually. See Add a way to re-sync media that is changed but has the same filename - #2 by Danika_Dakika. And you should check out the answer from @Keks on the same link as well.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.