- trandangduatQuản Lý Diễn Đàn
- Bài viết : 12
Xu : 17
Thích : 1
[Share] Xóa dấu # trước #hashtag
28/5/2016, 7:33 am
Demo
Có dấu #
Cách làm
Cách làm thì rất đơn giản !
Vào : Bảng điều khiển của ban quản trị --> Modules --> Javascript codes management
Tiếp đến rồi vào :+ Create a new javascript
Các bạn điền thao thông tin dưới đây :
Tile* | Xóa dấu # trước #hashtag |
Placement | In all the pages |
- Code:
$(function() {
$('a[href^="/tags/"]').each(function() {
var html = this.innerHTML;
if (html.charAt(0) == '#') {
this.innerHTML = html.slice(1);
}
});
});
- Code của Zzbaivong:
- Code:
$(function() {
$('.post-entry a[title^="See all tagged subjects with:"]').html(function() {
var html = this.innerHTML;
if (html.charAt(0) === '#') return html.slice(1);
});
});
- Code của Boss:
- Code:
$(function() {
(function(a) {
a('strong:contains("Tags: ")').hide().prev("br, hr").hide().prev("hr").hide();
a('a[title^="See all tagged subjects with:"]', ".dc-detail,.topic_detail,.pun .entry-content").replaceWith(function() {
return a("<a>", {
href: this.href,
"class": "tags",
text: this.textContent.replace("#", "").replace(/-/g, " ")
})
});
a(".dc-detail,.topic_detail").each(function() {
a(this).find("#tag").wrapAll('<div class="tagsGroup"></div>')
})
})(jQuery);
});
- BossNhà sáng lập
- Bài viết : 589
Xu : 1350
Thích : 82
Re: [Share] Xóa dấu # trước #hashtag
29/5/2016, 5:51 pm
Đóng góp 1 code mới rip nữa
- Code:
$(function() {
(function(a) {
a('strong:contains("Tags: ")').hide().prev("br, hr").hide().prev("hr").hide();
a('a[title^="See all tagged subjects with:"]', ".dc-detail,.topic_detail,.pun .entry-content").replaceWith(function() {
return a("<a>", {
href: this.href,
"class": "tags",
text: this.textContent.replace("#", "").replace(/-/g, " ")
})
});
a(".dc-detail,.topic_detail").each(function() {
a(this).find("#tag").wrapAll('<div class="tagsGroup"></div>')
})
})(jQuery);
});
- trandangduatQuản Lý Diễn Đàn
- Bài viết : 12
Xu : 17
Thích : 1
Re: [Share] Xóa dấu # trước #hashtag
6/6/2016, 8:28 pm
Thanks Boss
Permissions in this forum:
You cannot reply to topics in this forum