From 10deda356144094392384b6204014d8c22741371 Mon Sep 17 00:00:00 2001 From: MascoSkray Date: Tue, 25 Apr 2017 15:25:53 +0800 Subject: [PATCH] fix: wrong blog tag address when not using subdomain When the blog doesn't use subdomain, the tag address will be wrong. Add a situation check to find out the right tag address. --- uoj/1/app/views/blog-nav.php | 3 +++ uoj/1/js/uoj.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/uoj/1/app/views/blog-nav.php b/uoj/1/app/views/blog-nav.php index 24c989d..31f0121 100644 --- a/uoj/1/app/views/blog-nav.php +++ b/uoj/1/app/views/blog-nav.php @@ -18,3 +18,6 @@ + \ No newline at end of file diff --git a/uoj/1/js/uoj.js b/uoj/1/js/uoj.js index 34aaf58..8cfce8d 100644 --- a/uoj/1/js/uoj.js +++ b/uoj/1/js/uoj.js @@ -287,7 +287,7 @@ $.fn.uoj_problem_tag = function() { } $.fn.uoj_blog_tag = function() { return this.each(function() { - $(this).attr('href', '/archive?tag=' + encodeURIComponent($(this).text())); + $(this).attr('href', uojBlogUrl + '/archive?tag=' + encodeURIComponent($(this).text())); }); }