viresh-ratnakar / exolve

Online interactive crossword software in JavaScript
MIT License
71 stars 15 forks source link

Possibility to hide clues #36

Closed erikstar closed 3 years ago

erikstar commented 3 years ago

First I must say your software is superb!

At the moment I use it for music quiz with absolutely no written clues, and for normal stuff it behaves as I want with empty clue desciptions.

But in two cases It creates the clue machinery which I want to hide. I actually created a way to patch your code do do exacly that... but I didn't really understand what I was doing...

1) When I create words with dash in it, even with empty description I get stuff https://fripp.changeip.org/melodikryss/melodikryss1/index_clues.html see 2d

2) When I link clues I must give description text. See the nodir-13 and/or 3d

So what would be super for me is a flag to turn off the two clue-view mechanisms (but not the marking of the actual squares).

Perhaps you can notice I use your standard mechanisms to create "turning words" (thank you utf-8!)

And now when you have created a mechanism to turn off numbering it works even better!

Thanks!

/Erik S, Sweden

Thanks

viresh-ratnakar commented 3 years ago

This one seems to be a niche need that I don't think I would add an option for, However, you can get what you need with available features, like this:

Add a function called customizeExolve before the call to create the puzzle. If such a function exists, it gets called with the puzzle object passed after the puzzle is created, and arbitrary customization can be done without modifying the Exolve code directly. See detailed documentation here: https://github.com/viresh-ratnakar/exolve#customizations

You can hide the clues lists like this:

  function customizeExolve(puz) {
    document.getElementById('xlv1-clues').style.display = 'none';
  }
  createExolve(puzzleText);
erikstar commented 3 years ago

Perfect! And I added: document.getElementById('xlv1-curr-clue-parent').style.display = 'none';

Then it works perfect for me