Check out my generator at Perchance > Cocell.

  • 18 Posts
  • 58 Comments
Joined 10 months ago
cake
Cake day: December 27th, 2023

help-circle






  • I have a question. 🙋‍♂️

    If I use Puppeteer even in non-headless mode, why does Perchance’s UI… How do I say, well, the best way I can describe it is “they retract,” well sort of.

    Well let’s run node perchance.js and open it using Puppeteer.

    Now it opens this.

    -# !!! Light mod warning

    As you can see there is no default UI, but they are still there.

    That is when I run app.goToEditMode().

    Which opens the normal edit menu.

    And then even if I close the edit menu, the default UI is still present.

    So this has been bugging me a while, why must it be that way? Is it because because of the Perchance screenshot API?










  • Heh, I could do that. In fact, that is what I actually thought I should do. But then, it would be more reliable to have the server based on Perchance itself, as Glitch tends to put projects to sleep that are inactive. And Glitch could also shut down any time, not that it is likely to happen.

    And another thing is, so many people would then rely on my Glitch WebSocket, I think there are restrictions to how many requests can be sent to a Glitch App per hour.

    A free Glitch account is only allowed 1000 hours in a month, though a month is around 744 hours.

    And I don’t want to bear liability for so many users as well.






  • The CSS dvh unit stands for “Dynamic Viewport Height.” It represents a portion of the height of the viewport, which can adjust dynamically as the viewport changes size, such as when a user groups tabs together in mobile, or resizes the window. It will take those elements into accounts as well when changing size.

    Since the browser support is not solid, many people declare it after declaring a normal height: 100vh rule. You can understand it greatly via this short video.

    About the ads, I will need a little time, I will experiment with it and see what I can find. For now, I know that almost every user with an unstable network is affected by this.

    Also, I was creating a script to interact with Perchance via the NPM Puppeteer module. But whenever Perchance was loaded, all the UIs were gone, or at least supposed to be gone. I wanted to learn a bit about this.

    The only problem it gave was that it was hard to login to my account via Puppeteer. The core reason I am using Puppeteer is so that I can push updates directly from my terminal. What do you think about that? There certainly are applications that can connect to a GitHub.






  • I think I now know your gender. :D

    As for ads, yes it often refreshes the application even when we do not have an adblocker. Due to the recent protest in my country, I think it could be due to; a slow network, or a restriction. My country have restricted access to many websites, and I think it could contribute to why the application cannot display ads, I still lean towards the slow network scenario.

    Also, I think you should use also use the dvh unit for as well, since in mobile, there is an issue where the application does not account for browser specific UI. I could show you some screenshots, but I don’t have any. :\

    And to avoid confusion, this is how I use the dvh unit.