Like
You're welcome.
Did you check it on /giveaways/new page? it seems to not work there with latest chrome.
Nope. It doesn't change the datepicker value just the display format for all the tooltips involving timestamps.
Comment has been collapsed.
Just dropping a note up here as it might help with its visibility, but I posted a modified version that might be useful to some people.
Thanks again! :D
Comment has been collapsed.
Just tested it and it works for me. Make sure both Firefox and Tampermonkey are up to date.
Comment has been collapsed.
suggest renaming topic to military time or zulu time
Technically, it's neither military nor Zulu despite being wrongfully understood as such. It's just 24H format. Zulu is basically GMT while the military usage has a different representation.
Comment has been collapsed.
Appreciate your work but would prefer the format "Shows time in 24H and day month, year format." as it's written it would do.
It's still month, year, time - only 24h.]
I'm not sure I understand what you mean. This is how it looks like: time is in 24H format and the date is in day, month, year format.
Do you mean for the time to prepend the date?
Comment has been collapsed.
I ment/prefer "20:57, 7. July, 2018"
I see. That's easily achievable and here's how:
Open the script (Click on Tampermonkey Dashboard then click on 'Steamgifts 24H') and replace
+ d + ", " + n + ":" + ("0" + o).slice(-2)+
with
+ n + ":" + ("0" + o).slice(-2) + ", " + d +
then save the script (Ctrl+S).
That's it. Have fun ;)
Comment has been collapsed.
I modified your script to dates in the YYYY-MM-DD HH:MM format, make the code more readable, and do away with today/yesterday/tomorrow. It might be useful to someone else, so I'm putting a copy of it here:
(function() {
'use strict';
var $ = window.jQuery;
$(function(){
$(document).on("mouseenter", "[data-timestamp]", function() {
var e = $(this).attr("title");
if (void 0 === e || !1 === e) {
var stamp = new Date(1e3 * $(this).data("timestamp")),
day = stamp.getDate(),
month = stamp.getMonth() + 1 /* Javascript months: 0-11 (??) */,
year = stamp.getFullYear(),
hour = stamp.getHours(),
minute = stamp.getMinutes(),
finaldate = year + "-" + ("0" + month).slice(-2) + "-" + ("0" + day).slice(-2);
"*" === $(this).text() && (finaldate = "Edited: " + finaldate), hour,
$(this).attr("data-ui-tooltip", '{"rows":[{"icon" : [{"class" : "fa-clock-minute", "color" : "#84cfda"}], "columns":[{"name" : "' + finaldate + " " + ("0" + hour).slice(-2) + ":" + ("0" + minute).slice(-2) + '"}]}]}')
}
})
});
})();
I'm interested in moving those tooltip dates to the main body, so that it shows YYYY-MM-DD HH-MM in the text (and "X days ago" in the tooltip), but I'm not good at coding, and even the changes above were already troublesome for me to make. Do you think you could help with my quest?
Thanks a lot for your script, which helped with my own, and for any help you might be able to provide with further changes!
Comment has been collapsed.
Thanks a lot for your script, which helped with my own, and for any help you might be able to provide with further changes!
You're very welcome and also thanks for your contribution. The script is easy to adapt to one's liking and rather than customizing the release it's better for everyone to customize their version to suit their preferences by using the initial script as a starting point.
For the time being I'm not planning to further look into this but I hope you had fun messing around with it. If I get some spare time and I have nothing else better to do I might give it a go and add some further customization to it, but not for the time being.
Cheers.
Comment has been collapsed.
That ISO date format could be a thing to consider. Thankfully it is slowly getting spread, so it is easer to write dates in a manner people understand it. :)
Oh, yes, apparently I never posted here, but I love this small script. I can easily calculate with 12-hour clock, but 24-hour clock is the easiest to look at (this is why I have hard times buying a watch, most are still using the analogue interface).
Comment has been collapsed.
I'm glad you like it. I'm also used with the 24 hour time format, although I don't have any issue with the 12 hour format. As long as people remember that ante means before, post means after and meridiem means noon it should be straightforward to read time in am/pm format. It's only harder if you don't know if it's day/night and don't have an am/pm reference. But that being said I still prefer to read it in 24 hour format since it's the laziest and self-explanatory form you can use to represent time.
In my opinion, rather than the 12/24 hour format the more confusing one is the day/month vs month/day representation that is harder to read when having both values <= 12 and without prior knowledge of the used format.
Comment has been collapsed.
25 Comments - Last post 26 minutes ago by entitygeorge
51 Comments - Last post 29 minutes ago by popp9305
181 Comments - Last post 1 hour ago by Fluffster
105 Comments - Last post 2 hours ago by LosingMyEdge
39 Comments - Last post 3 hours ago by OneManArmyStar
760 Comments - Last post 3 hours ago by m0r1arty
21 Comments - Last post 3 hours ago by OneManArmyStar
19 Comments - Last post 27 seconds ago by VahidSlayerOfAll
496 Comments - Last post 5 minutes ago by tamisrah
44 Comments - Last post 10 minutes ago by egg0
5 Comments - Last post 13 minutes ago by Lugum
513 Comments - Last post 14 minutes ago by DrTenma
0 Comments - Created 16 minutes ago by FlameB1
19 Comments - Last post 29 minutes ago by wigglenose
Noticed this thread that asked for this feature. Here's a userscript that does exactly that. Install from here. Requires no permission. Needs Tampermonkey. Tested in Chrome.
Note: It doesn't change the datepicker values just the display format for all the tooltips involving timestamps. Therefore, "June 18, 2018, 8:37pm" becomes "18 June, 2018, 20:37".
Shows time in 24H and day month, year format.
Comment has been collapsed.