diff --git a/js/ditto.js b/js/ditto.js
index 9be4d95..db97c97 100644
--- a/js/ditto.js
+++ b/js/ditto.js
@@ -45,7 +45,6 @@ var getHash = function (hash) {
};
var disqusCode = '
留言
';
-var wwadsCode = '';
var menu = new Array();
function initialize() {
@@ -126,7 +125,7 @@ function searchbar_listener(event) {
if (q !== '') {
var url = 'https://github.com/ruanyf/es6tutorial/search?utf8=✓&q=' + encodeURIComponent(q);
window.open(url, '_blank');
- win.focus();
+ window.focus();
}
return false;
/*
@@ -244,6 +243,9 @@ function li_create_linkage(li_tag, header_level) {
}
function create_banner(element) {
+ var banner = $('')
+ .insertAfter(element);
+ /*
// 2022年8月25日
var deadline = new Date(2022, 7, 25);
if (deadline - (new Date()) < 0) return;
@@ -265,6 +267,7 @@ function create_banner(element) {
var banner = $('' + text + '
')
.insertAfter(element);
setTimeout(function () {if (banner.css('display') === 'none') {show_loading();show_error();} }, 500);
+ */
}
function create_page_anchors() {
@@ -358,7 +361,8 @@ function statistics() {
s.parentNode.insertBefore(hm, s);
}
-function router() {
+function router() {
+ window.focus();
var path = location.hash.replace(/#([^#]*)(#.*)?/, './$1');
var hashArr = location.hash.split('#');
@@ -394,7 +398,7 @@ function router() {
$.get(path, function(data) {
$(ditto.error_id).hide();
- $(ditto.content_id).html(marked(data) + wwadsCode + disqusCode);
+ $(ditto.content_id).html(marked(data) + disqusCode);
if ($(ditto.content_id + " h1").text() === ditto.document_title) {
document.title = ditto.document_title;
} else {