otzbergnet/wbmExtension

Show how many times page has been saved on Wayback

gingerbeardman opened this issue · 15 comments

Comparing to official extension, I find the "how many times it has been saved" total quite useful. But not really the badge, it's too in-your-face.

wbmExtension
Screen shot 2020-11-16 at 16 50 48

Official
Screen shot 2020-11-16 at 16 49 13

Let me peek at the API response :)

Could you send me the original SVG for the logo? If I update to add the count, I would want to update the app icon at the same time

Seems like Wayback Machine gets the count from https://web.archive.org/__wb/sparkline?collection=web&output=json&url=https%3A//www.otzberg.net/wayback

That extension is extremely talkative, it pretty much sends a server request to archive.org for EVERY page you visit so it can show you that badge. If you are logged in, it does seem to send a cookie along as well, so it can trace you even better. I trust that those guys aren't evil, but it does make me feel uneasy about it (I ended up disabling).

Anyhow, we can easily include that sparkline count ourselves - I'll have a play this week

I agree with your sentiments. Maybe our extension could only make those requests when the window is opened? That's the point I want to see them, requesting the data before is unwarranted.

Good new, Wayback already makes API calls only when needed (i.e. when the popover is opened). It's the reason we show the spinner, but I would be super uncomfortable otherwise.

I believe this is what I need to do:

@gingerbeardman
Could you please give me your thoughts on how to best display this data?

Screenshot 2020-11-19 at 18 26 12

Will have a think today

Here's an idea - what if the number would be shown in parenthesis behind "Show Page History", as in

Last archived: 
18 days ago
---
Save Current Page
----
Show Page History (98)
remaining links

?

Screenshot 2020-11-21 at 08 59 50

I've arrived at this display for now - and will move on to another project for the remainder of the weekend. Still very much interested to hear your thoughts

I prefer the former (after history) because it seems more relevant? But I can see there may to be enough space.

Though I don't mind either.

Thank you so much for your feedback @gingerbeardman ! I found a few examples of where large save counts cause me some concern with the display. This is something I should be able to address, I agree it makes most sense to show it there, I just need to play a bit with the display (maybe simply making the window a bit wider ;) )

Screenshot 2020-11-21 at 18 18 15

Screenshot 2020-11-21 at 18 19 15

Screenshot 2020-11-21 at 18 48 23

I think I laded at widening the window by 20 pixel.... I like it enough to consider releasing it :)

Fine by me 👍 nice work, thank you

I have submitted this to the appstore this morning #29 and hope that it will work well. I also made a change to the function that opens the tab that caused crashing and I have been able to reproduce crashing since, I'll close the other issue as well - but we an reopen should you notice it again! Many thanks for your kind and generous collaboration

There's a bug where the history total is not overwritten from a previous tab if there is no history result with the current tab:

  1. click WBM icon on a tab with history results (shows number)
  2. click WBM icon on a tab with no history results (bug: shows same number)
  3. click WBM icon again on same tab with no history results (correctly shows no number)

I made this a new issue