Qinerous

u/qinerous@lemmy.world
10 posts · 53 comments

Recent posts

Recent comments

on [Suggestion] Gallery Sort · c/perchance · 2 pts · 115d

Are you sure these are built-in functions of plugin? I tried using handleFilter(this.value) and handleSort(this.value), but I got an error saying that there are no such functions. Without the actual code for these functions, it won't work

on [Suggestion] Gallery Sort · c/perchance · 1 pts · 116d

I meant in words. For example, show only posts that include "Drawn Anime" in the SaveDescription or something like this

well... It's possible, but it's more complicated than it seems. The problem is that the select elements are static, and in order to change them, you either need to manually interact with the each element or recreate the select by simulating its "update" and giving its options, but since the checkbox has changed, the elements will also change.

I almost got it to work by taking the script for creating these selects from the framework and slightly modifying it to use it to the html of the select element. However, due to issues with Perchance, it reads [ ] as text instead of executing the contents.

Here is the link if you want to see

If you really need it, you can give the codes in the html code panel that I added in to AI chat bot and tell it to evaluate this key that has [brackets] before adding a new option

if you don't want to bother, just split these categories into different Selects (drop down lists)

https://perchance.org/doc-t2i-framework-plugin-v2

You can use the visible()=> property of components to control their display using conditions. If you set the same display conditions for multiple components, you can group them so that they only appear together.

If you want to access a component through the html code panel, for example, select this persona, then you can use:

document.querySelector('select[data-name="persona "]')

or completely ctn of this component:

document.querySelector('select[data-name="persona "]').closest('.input-ctn')

example of use, hide this component:

const tm = document.querySelector('select[data-name="persona "]').closest('.input-ctn');
tm.style.display = 'none';

To prevent the button from shaking, set a specific height for Output

<div style="height:80px;">
 <p id="outputName">[w = enemy.selectOne]</p>
</div>

just add this tags around of your <p id="outputName">[w = enemy.selectOne]</p>

on [question] Image data · c/perchance · 1 pts · 175d

Thank you very much for the function, it can really be useful for many tasks!

But unfortunately, in this particular situation, it doesn't work quite as expected. Without beforeGenerate(), guidanceScale currently gives for each image a random value that you specified (for example, {10-20}).

However, beforeGenerate() takes a single value from this range and assigns it to all images

on custom imports · c/perchance · 4 pts · 186d

Oh, there's really a lot of code here

You can define functions/classes/variables in different pages, then simply import them into the main page.

you can use This

Or if you want several pages, then you can still import them in a similar way:

ld1 = {import:load-q}

and in html code panel:

<script>
  [ld1()]
</script>

::: spoiler •


Additional :::

on Saving gallery · c/perchance · 1 pts · 195d

Most likely there are simply too many images. Here, it will only help to delete unnecessary folders to make save easier, or to save folders separately

In my opinion, it would be great to have more events and more often. Not just monthly events, but also weekly ones, which would encourage more activity. I also think advertising this events in generators would be beneficial both for the generators themselves and for the Perchance community. If more than one person takes over the organization, it is quite feasible, I personally am ready to help

on need help · c/perchance · 2 pts · 267d

instead of

output = [word]

write

output = [word.getAllKeys.filter(w => w.length == 5)]