Skip to content

Commit 1ca72e2

Browse files
committed
Make timestamps operate more robustly on blogs
1 parent 24aa254 commit 1ca72e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Extensions/timestamps.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//* TITLE Timestamps **//
2-
//* VERSION 2.7.2 **//
2+
//* VERSION 2.7.3 **//
33
//* DESCRIPTION See when a post has been made. **//
44
//* DETAILS This extension lets you see when a post was made, in full date or relative time (eg: 5 minutes ago). It also works on asks, and you can format your timestamps. **//
55
//* DEVELOPER STUDIOXENIX **//
@@ -157,6 +157,11 @@ XKit.extensions.timestamps = new Object({
157157
// Split permalink into sections, discarding the scheme
158158
var link_parts = permalink.replace(/https?:\/\//, "").split("/");
159159
blog_name = link_parts[0];
160+
} else {
161+
var href_parts = document.location.href.match(/https?:\/\/([^.]+)\.tumblr\.com/);
162+
if (href_parts) {
163+
blog_name = href_parts[1];
164+
}
160165
}
161166
}
162167

0 commit comments

Comments
 (0)