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

Is it possible to remove download image link? #107

Open
charlesroper opened this issue Oct 18, 2023 · 0 comments
Open

Is it possible to remove download image link? #107

charlesroper opened this issue Oct 18, 2023 · 0 comments

Comments

@charlesroper
Copy link

I've just installed this plugin for my org and have had a request from a teacher asking if its possible to disable to the download image button. I can't see a way of doing this in settings.

In the code, it looks like I can remove these lines from the JS:

.append(create('<a id="bottomNavDownload" href="#"></a>'))

Y.one('#bottomNavDownload').on(CLICK, function (evt) {
evt.halt();
var active = this.get(ACTIVE_IMAGE);
window.open(this.get(IMAGE_ARRAY)[active][0] + '?forcedownload=1', '_blank');
}, this);

Is that correct? I'm a bit wary of hacking the code, and I don't know enough about Moodle plugin development to submit a PR with it done "properly" (i.e. adding a setting). Would this be difficult to add?

We're currently on Moodle 3.9.

Many 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

No branches or pull requests

1 participant