Skip to content

Commit 536ac22

Browse files
committed
refactor: adjust wwads banner
1 parent c1a81dc commit 536ac22

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

js/ditto.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var getHash = function (hash) {
4545
};
4646

4747
var disqusCode = '<h3>留言</h3><div id="disqus_thread"></div>';
48+
var wwadsCode = '<div class="wwads-cn wwads-horizontal" data-id="197" style="max-width:100%;"></div>';
4849
var menu = new Array();
4950

5051
function initialize() {
@@ -243,9 +244,6 @@ function li_create_linkage(li_tag, header_level) {
243244
}
244245

245246
function create_banner(element) {
246-
var banner = $('<div class="wwads-cn wwads-horizontal" data-id="197" style="max-width:100%;"></div>')
247-
.insertAfter(element);
248-
/*
249247
// 2022年8月25日
250248
var deadline = new Date(2022, 7, 25);
251249
if (deadline - (new Date()) < 0) return;
@@ -267,7 +265,6 @@ function create_banner(element) {
267265
var banner = $('<a href="http://www.apeclass.com?did=12" style="color: #333333;" target="_blank"><div style="' + styleStr + '">' + text + '</div></a>')
268266
.insertAfter(element);
269267
setTimeout(function () {if (banner.css('display') === 'none') {show_loading();show_error();} }, 500);
270-
*/
271268
}
272269

273270
function create_page_anchors() {
@@ -397,7 +394,7 @@ function router() {
397394

398395
$.get(path, function(data) {
399396
$(ditto.error_id).hide();
400-
$(ditto.content_id).html(marked(data) + disqusCode);
397+
$(ditto.content_id).html(marked(data) + wwadsCode + disqusCode);
401398
if ($(ditto.content_id + " h1").text() === ditto.document_title) {
402399
document.title = ditto.document_title;
403400
} else {

0 commit comments

Comments
 (0)