I’m working on a test generator for gallery prompt searching here: https://perchance.org/gallery-search-forking-rudbo

It’s forked from prompt-hunter, created by the author of AI Art Generator (Advanced).

The issue arises when I try to implement this into another test generator: https://perchance.org/friendly-notification-and-concept-board-animation In this version, the search button doesn’t update the gallery as expected.

It seems like the gallery either needs to be enforced via iframe or replaced with a local component—but neither approach has worked so far.

Strangely, if I click the toggle theme button, the search button suddenly works once. So I tried adding the following logic to the search button:

onclick="changeAll(tagInputEl.value); update(panelCtn);"

and then also tried:

onclick="changeAll(tagInputEl.value); update(panelCtn); update(galleryContentEl);"

Still no effect.

Any suggestions or insights would be greatly appreciated!

  • RudBo@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    21 days ago

    Now I understand it’s too complicated and I mess up in banned prompt list conjugating

    • RudBo@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      21 days ago

      okay rephrasing my question: I have this jail = {import:furry-banlist} and that
      galleryOptions bannedPromptPhrases = [jail.bannedPromptPhrases]

      How do I joined them together with search?

      // Modify the 'bannedPromptPhrases' array
            dataObj.bannedPromptPhrases = [`/^(?!.*(\\b${formatTagName}\\b)).*$/i`]; 
      

      I don’t get how it could work with using [YourListNameHere, /^(?!.*(\\b${formatTagName}\\b)).*$/i] here