Rename Safe mode to Restricted mode #1265
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1259. "Restricted" is what is used in Visual Studio Code when a file outside of a trusted Repo is opened. I think we risk implying that the mode is fully "Safe" by calling it "Safe". In fact it isn't, because inline JS can still run (at least outside of a Chromium Browser Extension), even though all attached scripts are disabled. It is "safer" than ServiceWorker mode or ServiceWorkerLocal mode, but it isn't 100% "safe".
Additionally, calling it "Safe" makes it sound more attractive than it is: it's a highly restrictive mode in which many things will be broken in all but the most static of ZIMs. It's a good way to view the contents of a ZIM in a relatively static environment before deciding if the ZIM is trusted, but it's not viable for everyday use except for Wikipedia and Stack Exchange ZIMs.
Please note, we never actually released a public version of the app with JQuery mode renamed as Safe mode, so this won't be a confusing change for users. They will simply see that "JQuery mode" (not really intelligible to the average user) is now renamed as "Restricted mode", which better describes what it does.