Some of my updates in the generator disappear. I only realize after several subsequent updates that some update was reset, and without noticing it, I use the old code, update it, and save it. As a result, I have to look for backup files, search through them for every line of code, and restore them manually. I think the problem is with the tab. That is, there’s a new system for saving the progress of the currently open generator tab. And accordingly, every time I restart the computer or browser, I have to close the open tab and reopen it to be absolutely sure that it contains the latest updates. And even the save/saved button at the top is misleading.

[–] [S] 2 points 5 months ago (1 child)

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

  • source
  • parent
  • context
  • [–] 1 point 6 months ago (3 children)

    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)

  • source
  • parent
  • context
  • [–] 1 point 6 months ago (5 children)

    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';
    
  • source
  •  

    if write to Gscale input=> "{10-20}"

    and

    imageOptions
      guidanceScale = [input.Gscale]
      saveDescription = Guidance Scale is [input.Gscale]
      
      // or
      saveDescription = Guidance Scale is [settings.imageOptions.guidanceScale] 
      
    

    it will assign a random Guidance Scale to the image every time, but in its saveDescription, it will write a different random number instead of the used before.

    Is there any way to get the value of the guidanceScale of this image?

    view more: next ›