kiwix-js
kiwix-js copied to clipboard
Add option to turn off external link warning in associated dialogue box like Kiwix Android
[Originally posted in kiwix/kiwix-js-windows/issues/295, but best to work on here, upstream] Kiwix Android has a little link that allows a user to turn off the dialogue box that warns about external link opening (see screenshot below). We could add something similar to KJS and KJSW. It would be a link that takes the user to the option in Configuration and highlights it (thus educating the user), as we do with with the Active Content Warning.

I am a beginner and i can try this
@dalalvarun Thank you for the offer. Please check https://github.com/kiwix/kiwix-js/blob/master/CONTRIBUTING.md and see if you are comfortable that you can do those things, and also that you have an idea of how you would tackle this PR. Then let us know if you want to be assigned this PR.
Yes i think i can do it over a period of few days. Please assign it to me
Hi @Jaifroid, is it still active?
Hello @ankur12-1610, yes this issue is still open. Do you want to tackle it?
Yeah, would love to!
Thanks, @ankur12-1610 I've assigned you!
Hey I scavenged the codebase and found the related function here can you please verify if this is the correct place to add the Do not ask anymore option
?
Hey , This issue is solved or not
Can I Try To Solved It
Well, it is assigned to @ankur12-1610. @ankur12-1610, do you still want to work on it?
Hey, @Jaifroid. Is anyone already working on this issue? If not, let me know if I can take this up. Thanks
@gaurav7019 With pleasure! Nice to see you back here!
@gaurav7019 There are a few changes in how we're developing this app now. Please look again at CONTRIBUTING, where I explain most of the changes. Basically, the app will need to be built to the dist folder before final testing, and it's also best if you do an npm install in the root directory. I'm happy to clear up any doubts.
Thanks, @Jaifroid. Nice to be back here :) Sure, I will have a look and reach out.
Hey, @Jaifroid. Can you guide me on how can I repro the active content warning dialougue box that has the option to disable it (for reference)?
You can trigger active content warning by switching to JQuery mode and loading a dynamic ZIM like Gutenberg. Of course that's not the same dialogue box as the external link warning box, but the logic for turning it off might well be similar.
Checked out Gutenberg, but the file is too large (over 70 GB). Can you point me to a smaller ZIM file with some active content in it?
There are lots of languages that have much smaller Gutenberg archives, e.g. https://library.kiwix.org/content/gutenberg_es_all_2023-05/.
But I wonder why you're going down this path, when what's really needed is for you to modify the code I believe you yourself wrote in uiUtil.systemAlert()
to include a tick box as shown in mockup below. Obviously the tickbox would only be shown when an extra parameter is passed (e.g. a Boolean doNotShowOption
).
Or maybe call it displayHideOption
, as it's less confusing!
I wanted to see how the link takes the user to a config option and highlights it, as you mentioned in the issue description. NVM, here, I'll add this checkbox. But wasn't the original req was to keep the checkbox under the configure tab like all the other settings?
I wanted to see how the link takes the user to a config option and highlights it, as you mentioned in the issue description. NVM, here, I'll add this checkbox. But wasn't the original req was to keep the checkbox under the configure tab like all the other settings?
It could be done as a link that takes you to the check box in configuration, or there could also be a quick checkbox in the dialogue. Either way we'll need an option in config. Whatever you think is best.
is this issue still open? if yes i would like to work on it
@Krriishhhhhh Thanks for your interest. Please read CONTRIBUTING carefully all the way through, to learn how to set up your development environment for this Repo, and to have an idea of how the code works. If you're confident you have a solution to this issue after you've done the preparation, please explain your proposed solution here. Then I'll be able to assign you.
I would like to work on this issue. I am very confident that I can work on this issue. I have already implemented part of the functionality i.e a checkbox in configuration page to achieve the desired outcome in my local setup. I am confident I can implement the rest of the functionality too.
@prateekgarg08 Thanks. I'll assign you, but please make sure to familiarize yourself with the information in CONTRIBUTING, which covers a number of gotchas with the code in this Repo.
Hey @Jaifroid I am Navneet, I have setup this project on my local by going through CONTRIBUTING.MD file I am well aware of the JavaScript let me know if anyone working on the issue if not please assign this task to me I will surely try to add an option to hide external link warning issue
Hi @Jaifroid, would it be possible for me to work on this issue, since there has been no activity on it for a while?