# ROpdebee's userscripts support thread

**URL:** <https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947>\
**Category:** MusicBrainz\
**Tags:** userscripts\
**Created:** [September 22, 2021, 12:21am UTC](https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947 "2021-09-22T00:21:42Z")\
**Posts on this page:** 1\
**Showing post:** 90

<div class="post-metadata">

**Author:** ![chaban](https://community.metabrainz.org/user_avatar/community.metabrainz.org/chaban/32/111349_2.png) [@chaban](https://community.metabrainz.org/u/chaban)\
**Post date:** [June 22, 2022, 4:42pm UTC](https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/90 "2022-06-22T16:42:01Z")

</div>

I just retried all three versions in incognito mode, all extensions disabled except VM beta 2.13.0.20, all userscripts disabled except `mb_multi_external_links`:

`def082ca6f8822a81295e1fcec888fa22e614fa4` doesn’t work  
`2ea9cead2f6c3a9e78f32584d2c43c732b1a1a1e` doesn’t work  
`a35e7651c68b623dc607d0520cdb74cd843ed748` works

then I went back to normal mode and restored the VM backup I created before this test. It no longer works.

I reinstall `a35e7651c68b623dc607d0520cdb74cd843ed748` and it works. Reinstalling `2ea9cead2f6c3a9e78f32584d2c43c732b1a1a1e` makes it stop working.

I didn’t see any errors the entire time.

* * *

## Enhanced cover art uploader

1. Omit [unnecessary parentheses](https://musicbrainz.org/search/edits?auto_edit_filter=&order=asc&negation=0&combinator=and&conditions.0.field=release&conditions.0.operator=%3D&conditions.0.name=PRINCESS+CONNECT%21+Re%3ADive+ORIGINAL+SOUNDTRACK+VOL.4&conditions.0.args.0=3365360&conditions.1.field=id&conditions.1.operator=BETWEEN&conditions.1.args.0=90604245&conditions.1.args.1=90604251)

## Guess language and script

1. Use id instead of name in dropdown. _User interface can be translated 😛_

```plaintext
instrument.js:102 [mb_guess_language] An error occurred Error: Label Japanese not found in selection dropdown list
    at selectOption (MB： Guess language and script.user.js:239:17)
    at guessScript (MB： Guess language and script.user.js:251:7)
    at MB： Guess language and script.user.js:189:15
(anonymous) @ instrument.js:102
onError @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:28
fireHandlers @ MB： Guess language and script.user.js:28
error @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:28
Promise.catch (async)
logFailure @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:261
r @ helpers.js:71

```

1. Some detection feedback:

[https://musicbrainz.org/release/f76b563d-e87b-4720-a725-fdeeb4ce7c20](https://musicbrainz.org/release/f76b563d-e87b-4720-a725-fdeeb4ce7c20)  
mul / Qaaa → jpn / Jpan

```plaintext
instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB： Guess language and script.user.js:76:13
    at o (MB： Guess language and script.user.js:25:531)
    at _settle (MB： Guess language and script.user.js:25:840)
    at t (MB： Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
onError @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:28
fireHandlers @ MB： Guess language and script.user.js:28
error @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:187
Promise.then (async)
_catch @ MB： Guess language and script.user.js:25
(anonymous) @ MB： Guess language and script.user.js:184
Promise.then (async)
_call @ MB： Guess language and script.user.js:25
doGuess @ MB： Guess language and script.user.js:183
(anonymous) @ MB： Guess language and script.user.js:261
r @ helpers.js:71
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 98.54%, of which 78.95% Latin

```

[https://musicbrainz.org/release/422544a5-c27e-4ac1-8c48-011ecc5db09f](https://musicbrainz.org/release/422544a5-c27e-4ac1-8c48-011ecc5db09f)  
jpn / Qaaa → jpn / Jpan

```plaintext
instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB： Guess language and script.user.js:76:13
    at o (MB： Guess language and script.user.js:25:531)
    at _settle (MB： Guess language and script.user.js:25:840)
    at t (MB： Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
onError @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:28
fireHandlers @ MB： Guess language and script.user.js:28
error @ MB： Guess language and script.user.js:28
(anonymous) @ MB： Guess language and script.user.js:187
Promise.then (async)
_catch @ MB： Guess language and script.user.js:25
(anonymous) @ MB： Guess language and script.user.js:184
Promise.then (async)
_call @ MB： Guess language and script.user.js:25
doGuess @ MB： Guess language and script.user.js:183
(anonymous) @ MB： Guess language and script.user.js:261
r @ helpers.js:71
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 91.04%, of which 35.82% Latin

```

[https://musicbrainz.org/release/c69a350e-5103-4556-873f-59b077b9c812](https://musicbrainz.org/release/c69a350e-5103-4556-873f-59b077b9c812)  
jpn / Qaaa → jpn / Jpan

```plaintext
instrument.js:102 [mb_guess_language] Identified as ja with confidence 83%
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 82.55%, of which 20.13% Latin

```

[https://musicbrainz.org/release/0309d375-7f4b-43d0-9a4c-57255603de01](https://musicbrainz.org/release/0309d375-7f4b-43d0-9a4c-57255603de01)  
 → deu / Latn

```plaintext
instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB： Guess language and script.user.js:76:13
    at o (MB： Guess language and script.user.js:25:531)
    at _settle (MB： Guess language and script.user.js:25:840)
    at t (MB： Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 96.85%

```

[https://musicbrainz.org/release/f2bc581d-b5af-439c-bf41-806bea8065c9](https://musicbrainz.org/release/f2bc581d-b5af-439c-bf41-806bea8065c9)  
 → eng / Latn

```auto
instrument.js:102 [mb_guess_language] Identified as en with confidence 92%
instrument.js:102 [mb_guess_language] Could not determine script
(anonymous) @ instrument.js:102

```

[https://musicbrainz.org/release/e5bc7429-f28c-4d18-ae5b-f7472da3e511](https://musicbrainz.org/release/e5bc7429-f28c-4d18-ae5b-f7472da3e511)  
 → eng / latn

```plaintext
instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB： Guess language and script.user.js:76:13
    at o (MB： Guess language and script.user.js:25:531)
    at _settle (MB： Guess language and script.user.js:25:840)
    at t (MB： Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 100.00%

```

[https://musicbrainz.org/release/2464d67d-a675-4017-9153-765a21cdd1a4](https://musicbrainz.org/release/2464d67d-a675-4017-9153-765a21cdd1a4)  
 → deu / Latn

```plaintext
instrument.js:102 [mb_guess_language] Identified as en with confidence 99%
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 99.34%

```

[https://musicbrainz.org/release/d2bc383d-a4d3-4248-8a78-2820c6facc8a](https://musicbrainz.org/release/d2bc383d-a4d3-4248-8a78-2820c6facc8a)  
 → deu / latn

_Trouble with punctuation?_

```auto
instrument.js:102 [mb_guess_language] Identified as en with confidence 92%
instrument.js:102 [mb_guess_language] Could not determine script
(anonymous) @ instrument.js:102

```

### Trivia:

While looking at the language statistics I noticed something that looks like a 10 year old [bug](https://tickets.metabrainz.org/browse/MBS-12470)

---

_[View the full topic](https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947)._
