Plugin:disable-overlay-close #993
Replies: 6 comments 8 replies
-
hey, you don't need a plugin, just this script in admin-panel / custom-html / script document.body.addEventListener('click', ev => {
if (!ev.target.classList.contains('dialog-backdrop')) return
ev.preventDefault()
ev.stopPropagation()
}, true) |
Beta Was this translation helpful? Give feedback.
-
i think you could have done something based on my previous short script instead. as a side note, the current helper is only trained on backend plugins, while you are doing something that is frontend. |
Beta Was this translation helpful? Give feedback.
-
i don't think the risk of "pollution" you talk about is real, so don't worry.
this not strictly true. Knowing the specific frontend APIs makes the work easier and better, and sometimes it's even necessary to have something that really works. |
Beta Was this translation helpful? Give feedback.
-
also, since you are not a frontend developer, you don't know when a solution is overcomplicated, even we don't consider HFS' api, but just the browser's api |
Beta Was this translation helpful? Give feedback.
-
It's good that there's no pollution, because to me, the plugin-helper is like a "witch's cauldron"—constantly throwing various attempts into the "pot" over and over again... That’s for sure. APIs are definitely necessary, but there are a very few cases where certain functionalities can be "worked around" based on native capabilities. At least, in my experience, many complex features still can’t be achieved, surely because the underlying requirements can’t be bypassed, or perhaps additional API requests need to be made to make them possible. As you say, I’m not a frontend developer, so naturally, I have no knowledge of the entire underlying architecture. All I can do is probe around the edges through trial and error... But for me, this process of exploration is also part of learning and fun—even if it’s chaotic and noobish, at least I’ve picked up a few tricks. Besides, some of my weird requirements can still be solved through my own tinkering, which reduces the trouble for big brothers. I only report when there are clear functional gaps or bugs. I try my best to explore and solve these odd feature requests on my own, because sometimes, after using them for a while, I realize certain functionalities aren’t really that meaningful in the end, and I end up scrapping them and reverting to the original version... Like recently, I successfully wrote a script to "display remaining disk space" on the login page, but I eventually abandoned it because constantly obsessing over hundreds of GB of free space seemed a bit fool... It’s much more straightforward to just check it directly on the screen. After all, your software is already close to perfect... 沒有污染那就好,因為plugin-helper對我來說就好像一個“巫婆的大鍋”,不斷反復地往“鍋”里進行各種嘗試…… 那是肯定的,API肯定是需要的,只是有很少一部分功能是可以基於原生存在的基礎上進行“繞過”,至少我目前遇到不少複雜的功能還是實現不到的,肯定是因為無法繞過最底層的要求,也可能需要提出額外添加api的請求才能做到。 正如您提到的,我不是前端開發者,那麼可以肯定的是中間的整個架構肯定是不知情的,只能在外圍進行試探性的摸索…… 不過對我來說,摸索的過程也是學習和娛樂的一部分吧,雖然很chaos和菜鳥的,至少還是學到一些小技巧。 況且我一些奇怪的要求還是可以通過自己嘗試來解決,這樣減少對您們的煩擾,除了明顯的功能缺點和bug我才會獨立report。 這些奇怪的功能要求還是盡量自己嘗試摸索解決,畢竟有時候用到最後好像又覺得某些功能沒有太大的存在意義,而最後捨棄返回原版……就像我近期成功寫了個“顯示硬盤剩餘空間”的腳本放在登錄頁面內,最後還是捨棄了,因為時刻操心盯住幾百gb的剩餘空間好像有點傻了……直接打開屏幕看看還更直接。 畢竟你的軟件已經是接近完美了…… |
Beta Was this translation helpful? Give feedback.
-
did you use the plugin-helper version 2 for your recent projects? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/hugo529100/disable-overlay-close
Prevents closing dialogs by tapping outside or pressing ESC. This is especially useful for mobile users where accidental gestures may trigger unwanted dialog closure. Only the close button (X) is allowed to dismiss dialogs.
It doesn't seem to be very useful, but it solves the problem of accidentally closing the file when renaming or adding comment on my phone. It feels like a fifth wheel, but at least it is still hanging on the back like an off-road vehicle, so it will be useful sometimes.
Beta Was this translation helpful? Give feedback.
All reactions