Skip to content

Instantly share code, notes, and snippets.

View ltrebing's full-sized avatar

Lars Trebing ltrebing

  • Vanilla Reply
  • Munich, Germany
View GitHub Profile
@ltrebing
ltrebing / Display commit timestamp at github as javascript bookmark
Last active May 30, 2017 15:23 — forked from PhilippGrulich/Display commit timestamp at github as javascript bookmark
This simple js bookmark let you display the correct commit timestamp at github
javascript:(function() {
var relativeTimeElements = window.document.querySelectorAll("relative-time, time-ago, time.js-timeago");
function pad(n) {
return n < 10 ? '0' + n : n;
}
relativeTimeElements.forEach(function(timeElement) {
var d = new Date(timeElement.attributes.datetime.value);
timeElement.innerHTML =
d.getFullYear() + '-' +
pad(d.getMonth()) + '-' +

Keybase proof

I hereby claim:

  • I am ltrebing on github.
  • I am lars (https://keybase.io/lars) on keybase.
  • I have a public key whose fingerprint is 5156 DEF6 ADA7 5999 CD30 0C7B 1C77 A85A F06A 3B3F

To claim this, I am signing this object:

@ltrebing
ltrebing / delicious-bookmark
Created January 8, 2014 00:54
A Delicious bookmarklet that opens an old-style new tab (or window) instead of putting a fancy inline frame thing on the page.
javascript:(function(e,t){window.open(%22https://delicious.com/save?url=%22+encodeURIComponent(e.location.href)+%22&title=%22+encodeURIComponent(e.document.title)+%22&note=%22+encodeURIComponent(%22%22+e.getSelection()?e.getSelection():e.document.getSelection?e.document.getSelection():e.document.createRange().text)+%22&v=1.1%22,%22_blank%22);})(window)