Chào các bạn website mình là http://www.kenhgamethu.com/
Mình làm đúng theo hướng dẩn mà nó không hiện
Bạn nào giúp mình với
Mình làm đúng theo hướng dẩn mà nó không hiện
- Code:
.prefix { display: inline-block!important}
.prefix{background:#008287;color:#FFF;border-radius:2px;display:inline-block;height:18px;line-height:18px;padding:0 4px} /* Mặc định cho các tiền tố chưa đặt style riêng */
.prefix.game-pc{background:#16499a} /* Màu riêng cho tiền tố code */
.prefix.mu{background:#60a917} /* Màu riêng cho tiền tố Tool */
.prefix.hack{background:#fa6800} /* Màu riêng cho tiền tố Thông báo */
.prefix.kiem-the{background:#4390df} /* Màu riêng cho tiền tố zzbaivong */
.prefix.lmht{background:#CC0A6E}
.prefix.viet-hoa{background:#00FF00}
- Code:
function lang_vi(a) {
a = a.toLowerCase();
a = a.replace(/\u00e0|\u00e1|\u1ea1|\u1ea3|\u00e3|\u00e2|\u1ea7|\u1ea5|\u1ead|\u1ea9|\u1eab|\u0103|\u1eb1|\u1eaf|\u1eb7|\u1eb3|\u1eb5/g, "a");
a = a.replace(/\u00e8|\u00e9|\u1eb9|\u1ebb|\u1ebd|\u00ea|\u1ec1|\u1ebf|\u1ec7|\u1ec3|\u1ec5/g, "e");
a = a.replace(/\u00ec|\u00ed|\u1ecb|\u1ec9|\u0129/g, "i");
a = a.replace(/\u00f2|\u00f3|\u1ecd|\u1ecf|\u00f5|\u00f4|\u1ed3|\u1ed1|\u1ed9|\u1ed5|\u1ed7|\u01a1|\u1edd|\u1edb|\u1ee3|\u1edf|\u1ee1/g, "o");
a = a.replace(/\u00f9|\u00fa|\u1ee5|\u1ee7|\u0169|\u01b0|\u1eeb|\u1ee9|\u1ef1|\u1eed|\u1eef/g, "u");
a = a.replace(/\u1ef3|\u00fd|\u1ef5|\u1ef7|\u1ef9/g, "y");
a = a.replace(/\u0111/g, "d");
a = a.replace(/\W+/g, "-");
return a.replace(/^\-+|\-+$/g, "")
}
$(function () {
$("a[href^='/t'], a[href^='http://" + location.host + "/t']").html(function () {
var a = $(this).text();
if(/^\[([^\[\]]+)\]/.test(a)) return a.replace(/^\[[^\[\]]+\]/, function (a) {
return '<span class="prefix ' + lang_vi(a) + '">' + a.slice(1,-1) + "</span>"
})
});
});
Bạn nào giúp mình với