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

Different warning when Weebassembly is not enable #660

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

PhieF
Copy link

@PhieF PhieF commented Jun 7, 2024

Hi

Currently when users don't have webassembly enable, they only see an error telling them their browser is not supported. In some cases, with some advanced privacy settings, some browsers can disable webassembly by default. The purpose of this MR is to ask user to check in settings if they can enable webassembly !

Copy link
Owner

@marius-wieschollek marius-wieschollek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your commits are not signed/verified. Please sign your commits.

function showWebAssemblyCompatibilityWarning() {

var imgpath = OC.filePath('passwords', 'img', 'warning.png');
container = document.getElementById('main');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be either var container or the previous line should have a comma. I don't think you need imgpath at all.

container = document.getElementById('main');
container.innerHTML =
'<div class="passwords-browser-compatibility passwords-jit-compatibility">' +
'<div class="message"><img class="warning-icon" src="' + imgpath +'"/>'+OC.L10N.translate('passwords', 'To view this website properly, please enable Javascript JIT.') +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a broken image here. But i also don't think we need a warning icon for this.

'<div class="message"><img class="warning-icon" src="' + imgpath +'"/>'+OC.L10N.translate('passwords', 'To view this website properly, please enable Javascript JIT.') +
'</div><div class="info" >' +
'<h3 class="howto">' + OC.L10N.translate('passwords', 'How to enable it') + '</h3>' +
'<p>' + OC.L10N.translate('passwords', 'JavaScript JIT might be disabled in your browser in order to render web content in a more secure configuration. You can always enable Javascript JIT in the settings, depending on your web browser.') + '</p><br />' +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is placed directly onto the background image. This could be unreadable.
Its also very verbose. Additionally, neither Chromium nor Firefox do have a setting for this, both put it into the config / flags page. Additionally, calling the feature JIT may be cause them to misconfigure things in FF as typing JIT into the search of about:config will not show the actual setting to disable WASM.
I feel like it would be better to keep the message short and just tell users that "This app requires WASM/WebAssembly to be enabled. Please check our Wiki to learn how to enable it" and then create a page in the wiki like /Enable-WebAssembly. This would also have the benefit that admins can provide a custom help page instead of users doing things they find on Google

marius-wieschollek added a commit that referenced this pull request Jun 8, 2024
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
@marius-wieschollek
Copy link
Owner

I had some time over the weekend and just implemented the warning with the changes i requested

@PhieF
Copy link
Author

PhieF commented Jun 10, 2024

@marius-wieschollek hi, thanks you ! Would it be possible to use "OC.L10N.translate" which is practical to translate or customize text ? Thanks !

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

Successfully merging this pull request may close these issues.

2 participants