Comments (4)
言われてみると、エディター(編集者)側の心理を思えば、リロード事故防止機能はあったほうがいいですね。
なぜつけていなかったのか……
既存の、引用いただいた箇所は視聴者数の増減をなるべく正確にやりたかった、というコードな気がします。
beforeunload
で無条件に視聴者数をデクリメントするが、もし本当に閉じるかのアラートが出た際に思いとどまった場合、デクリメントしたのに視聴し続けていることになるので閉じられなかった場合の1分後に、自動的にカウントアップする setTimeout
を仕込んでる、ということだった気がします。
ご提案いただいたとおり、一度でも編集されている場合はそのタイミングで beforeunload
を設定する、というのがよさそうですね。
これはわたしの方で対応できると思いますが、他に懸念点や実装上の要望などはありますでしょうか?
from twigl.
とりま対応してみたんで、twigl.app で動作見てみてください。
不具合ありましたら教えてください!
from twigl.
良さそうです!修正ありがとうございます。
from twigl.
いえ、方針問題ないと思います!
from twigl.
Related Issues (14)
- [Feature request] GLSL code formatting feature HOT 8
- [Feature request] Uniform with number of frame HOT 6
- Idea for saving a link to a long script HOT 3
- High-resolution screenshot exporting HOT 2
- Defining functions in geekest mode HOT 2
- Live coding suggestions HOT 3
- Upgrade to WebGL 2 HOT 4
- Amazing. How to publish tweet? HOT 1
- doc: what are o0, o1, b1 ? ( and more ) HOT 4
- is there a way to browse Twigls ? all / per user ? HOT 11
- Backbuffer is set to GL_NEAREST HOT 4
- 長時間動かしていると重くなる HOT 2
- Exposed Google Cloud API Key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twigl.