Pages:
Author

Topic: [Userscript] Auto-Save your posts to drafts - page 2. (Read 453 times)

sr. member
Activity: 1666
Merit: 426
Does it work on the phone right now? I've done the installation on my computer but I'm not really using my computer that much since I'm mostly at work so hopefully this is available on the phone. The phone browsers are the most notorious when it comes to that mistake that you've said and it's a frustrating feeling when you get your sentences already done halfway and your replies finished but then someone messages you or there's a notification that you need to answer then you come back only to see the webpage refreshed. I wish I could do programming like you, the stuff that I can do if only I know how to program and write code.
legendary
Activity: 2758
Merit: 6830
January 07, 2024, 08:04:37 PM
#9
I noted some pros and cons of forum draft page.
Draft page - Pros & Cons

Some of cons are
Quote
  • Limited to only last 100 posts and drafts will be automatically deleted after 7 days
  • Unable to recover your deleted posts to where it initially posted
  • Almost unable to see where you post it (post ordinal number). Exception: You can only get which thread you post it, when you quote posts of others when reply them
  • Unable to know when you post it

Could your userscript add something to reduce those cons?
I could create my own draft implementation where posts would be saved on my server, but I can't see enough demand for that and there may be some downsides like having to trust my server (even though the data isn't too sensitive) and privacy issues (sending requests to my server).

Or I could make it save every post on your local browser. Cons: browser limitations, using too much space, etc...

At this time I don't see the point. If i'm writing a post I only care about its latest version (i.e before I missclicked F5 and refreshed the page) and if you're looking for a deleted post, using the ninjastic.space archive is usually enough.
hero member
Activity: 2366
Merit: 838
January 07, 2024, 07:53:12 PM
#8
It's a helpful userscript, thanks for coding it.

I noted some pros and cons of forum draft page.
Draft page - Pros & Cons

Some of cons are
Quote
  • Limited to only last 100 posts and drafts will be automatically deleted after 7 days
  • Unable to recover your deleted posts to where it initially posted
  • Almost unable to see where you post it (post ordinal number). Exception: You can only get which thread you post it, when you quote posts of others when reply them
  • Unable to know when you post it

Could your userscript add something to reduce those cons?

From the screenshot, it seems to save the time (when), but how about other points above?
legendary
Activity: 2758
Merit: 6830
January 07, 2024, 04:59:35 PM
#7
Could be just me, but the message icon beneath the text box is a bit of an eye full. Might be easier on the eyes if only the time of the last update is shown and not the date.
Right. Changed the code so it only shows the time (i.e "17:56:17 UTC"). Smiley

Also, when I go to drafts and return to the post the "Auto-Save draft is activated!" message pops up again and again, as I bounce back and forth.
There isn't much I can do since the script is stateless, meaning that every time you refresh, reload or navigate to another page the script runs from the beginning again. Maybe I could save the last draft to your browser's localStorage so it persists and checks if it's the same post you were writing before, but I feel like this is a bit too much.
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
January 07, 2024, 03:57:05 PM
#6
Another good script. Congratulations.

Although I've never felt the need for this type of script, I appreciate its value.
I hope it is useful, for anyone who feels the need for this script.

legendary
Activity: 2254
Merit: 2406
Playgram - The Telegram Casino
January 07, 2024, 08:06:32 AM
#5
Great work TryNinja. I don't write long texts regularly, but it helps to have a back up for the situation where you risk losing a message you took a lot of effort to write.

Could be just me, but the message icon beneath the text box is a bit of an eye full. Might be easier on the eyes if only the time of the last update is shown and not the date.
Also, when I go to drafts and return to the post the "Auto-Save draft is activated!" message pops up again and again, as I bounce back and forth.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
January 07, 2024, 04:02:47 AM
#4
Once upon a time I was writing a middle sized post and missclicked F5, losing the entire thing. This script helps mitigate this dangerous mistake! Tongue
I must admit it you have done a great job TryNinja.
Losing a post after making a very long write up is a big nightmare and can be very frustrating sometimes. One time I mistakenly reloaded a page and boom my long compiled post was lost  Cry. Since then I had to switch to using my html text editor to put together my posts before previewing and posting it here on bitcointalk. But with this script I can now do everything here Grin.
This will definitely come in handy especially for higher rank members who create very long and detailed posts.
+1 for the effort  Wink
hero member
Activity: 2520
Merit: 952
January 06, 2024, 10:45:59 PM
#3
A small question here: Will this script will be helpful too for mobile browser such as Kiwi and Mises or it is just for PC. I haven't checked script and will review after using.

It works, I just tried it.



@TryNinja Great work! This words don't justify how handy your scripts are.



hero member
Activity: 812
Merit: 619
January 06, 2024, 10:43:02 PM
#2
Inspired by libert19's suggestion, I wrote a small script that auto saves your posts to the forum draft every couple of seconds (customizable).

Once in time I was writing a middle sized post and missclicked F5, losing the entire thing. This script helps mitigate this dangerous mistake! Tongue  

That's is much needed script , Big thanks for script you created. Your effort in developing a tool whuch automatically saves forum posts to the draft is incredibly helpful because losing whole content just by small mistake is common here. It's a time-saver and enhances the user experience. Honestly I was writing large post in notepad and when I wrote fully then I copy pasted here and I hope now This script will save my time.


: https://greasyfork.org/en/scripts/484095-auto-save-draft-for-bitcointalk-org

Edit the INTERVAL_SECONDS variable at the top with the number of seconds you want your draft to automatically save (default: 5 seconds). If there are no changes on your post since the last draft (this includes pressing the "preview" button), the process is skipped.


A small question here: Will this script will be helpful too for mobile browser such as Kiwi and Mises or it is just for PC. I haven't checked script and will review after using.
legendary
Activity: 2758
Merit: 6830
January 06, 2024, 10:34:05 PM
#1
Inspired by libert19's suggestion, I wrote a small script that auto saves your posts to the forum draft every couple of seconds (customizable).

Once upon a time I was writing a middle sized post and missclicked F5, losing the entire thing. This script helps mitigate this dangerous mistake! Tongue

Installation: https://greasyfork.org/en/scripts/484095-auto-save-draft-for-bitcointalk-org

Edit the INTERVAL_SECONDS variable at the top with the number of seconds you want your draft to automatically save (default: 60 seconds). If there are no changes on your post since the last draft (this includes pressing the "preview" button), the process is skipped.

Quote

P.S: "Drafts are saved whenever you preview or post a topic, post, or PM. Up to 100 drafts are kept. Drafts are deleted after 7 days."
Pages:
Jump to: