mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
refactor: adjust wwads banner
This commit is contained in:
parent
c1a81dc51d
commit
536ac2251a
@ -45,6 +45,7 @@ var getHash = function (hash) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var disqusCode = '<h3>留言</h3><div id="disqus_thread"></div>';
|
var disqusCode = '<h3>留言</h3><div id="disqus_thread"></div>';
|
||||||
|
var wwadsCode = '<div class="wwads-cn wwads-horizontal" data-id="197" style="max-width:100%;"></div>';
|
||||||
var menu = new Array();
|
var menu = new Array();
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
@ -243,9 +244,6 @@ function li_create_linkage(li_tag, header_level) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_banner(element) {
|
function create_banner(element) {
|
||||||
var banner = $('<div class="wwads-cn wwads-horizontal" data-id="197" style="max-width:100%;"></div>')
|
|
||||||
.insertAfter(element);
|
|
||||||
/*
|
|
||||||
// 2022年8月25日
|
// 2022年8月25日
|
||||||
var deadline = new Date(2022, 7, 25);
|
var deadline = new Date(2022, 7, 25);
|
||||||
if (deadline - (new Date()) < 0) return;
|
if (deadline - (new Date()) < 0) return;
|
||||||
@ -267,7 +265,6 @@ function create_banner(element) {
|
|||||||
var banner = $('<a href="http://www.apeclass.com?did=12" style="color: #333333;" target="_blank"><div style="' + styleStr + '">' + text + '</div></a>')
|
var banner = $('<a href="http://www.apeclass.com?did=12" style="color: #333333;" target="_blank"><div style="' + styleStr + '">' + text + '</div></a>')
|
||||||
.insertAfter(element);
|
.insertAfter(element);
|
||||||
setTimeout(function () {if (banner.css('display') === 'none') {show_loading();show_error();} }, 500);
|
setTimeout(function () {if (banner.css('display') === 'none') {show_loading();show_error();} }, 500);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_page_anchors() {
|
function create_page_anchors() {
|
||||||
@ -397,7 +394,7 @@ function router() {
|
|||||||
|
|
||||||
$.get(path, function(data) {
|
$.get(path, function(data) {
|
||||||
$(ditto.error_id).hide();
|
$(ditto.error_id).hide();
|
||||||
$(ditto.content_id).html(marked(data) + disqusCode);
|
$(ditto.content_id).html(marked(data) + wwadsCode + disqusCode);
|
||||||
if ($(ditto.content_id + " h1").text() === ditto.document_title) {
|
if ($(ditto.content_id + " h1").text() === ditto.document_title) {
|
||||||
document.title = ditto.document_title;
|
document.title = ditto.document_title;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user