議論 » Greasy Fork への意見

Adding localized additional info is broken

§
投稿日: 2025/02/09

When I go to the Admin tab of my script and click the "Add a localized, synced additional info" button, the elements are always added with index 0: "additional_info_sync[0][sync_identifier]", "additional_info_sync[0][value_markup]" etc. This breaks radio buttons and makes adding additional infos impossible.

The same thing happens when pressing "Add a localized additional info" on the Update tab.

§
投稿日: 2025/02/12

I can't reproduce the bug; both places work for me. What browser are you using?

§
投稿日: 2025/02/12

The issue is caused by switching locales. The generated URL becomes "https://greasyfork.org/en/scripts/sync_additional_info_form?locale_override=1?index=1".

- xhr.open("get", button.getAttribute("data-form-path") + "?index=" + index);
+ const appendSearchChar = button.dataset.formPath.includes("?") ? "&" : "?";
+ xhr.open("get", `${button.dataset.formPath}${appendSearchChar}index=${index}`);
§
投稿日: 2025/02/12

Fixed now.

返信を投稿

返信を投稿するにはログインしてください。