Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Expecting double quoted ..." #10

Open
nise opened this issue Jan 30, 2019 · 8 comments
Open

"Expecting double quoted ..." #10

nise opened this issue Jan 30, 2019 · 8 comments

Comments

@nise
Copy link

nise commented Jan 30, 2019

All the config files are not correct. My Browser complains about commas after the objects in the "Testset" Array and after the key-value-pairs under "Files".

@timobaumann
Copy link
Contributor

what is your browser? what precisely is the complaint?

@seebk
Copy link
Member

seebk commented Jan 30, 2019

Yes, please give more details if you intersted in a solution. If the demo page works in your browser there is probably a syntax error in your configuration file.

@nise
Copy link
Author

nise commented Jan 30, 2019

Have look at the abx, mushra, and preference config:
{ "Name": "Castanets", "TestID": "id2", "Files": { "A": "audio/castanets_ref.wav", "B": "audio/castanets_2.wav", } }, ] }
The last coma leads to errors in Firefox.

@nise
Copy link
Author

nise commented Jan 30, 2019

I would further suggest to define the config files as JSON, instead of putting a singe JS variable in such a file.

In the index.html the JS code can be easily changed.

window.onload = function () {
            $.ajax({
                url: '/config/ab-experiment-config.json', // change your config file here
                type: 'GET',
                dataType: 'json',
                success: function (data) {
                    //testHandle = new MushraTest(data);    // <-- MUSHRA test class
                    testHandle = new AbxTest(data);     // <-- ABX test class
                    $('#Footer').prepend(testHandle.browserFeatureString() + '<br/>'); // still a bad coding practice here
                },
                error: function (err) {
                    console.error(err); 
                }
            });
        };

@seebk
Copy link
Member

seebk commented Jan 31, 2019 via email

@seebk
Copy link
Member

seebk commented Jan 31, 2019

The last coma leads to errors in Firefox.

I agree that this comma is not required, but I do neither get any warnings nor errors in the Firefox web console window. I have just verified this with Firefox 60.5 ESR from my Debian system.

@nise
Copy link
Author

nise commented Jan 31, 2019

I expected that a web-based app would run on a remote or local web server.

The things with the comma might be more a matter of coding standards. However, I was not able to run the app because of this bugs.

@timobaumann
Copy link
Contributor

can we close this then as there's no bug and possibly move the discussion about requiring a web server (which, at the same time would simplify the JS) into a different bug/feature request/issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants