@@ -45,7 +45,6 @@ var getHash = function (hash) {
45
45
} ;
46
46
47
47
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>' ;
49
48
var menu = new Array ( ) ;
50
49
51
50
function initialize ( ) {
@@ -126,7 +125,7 @@ function searchbar_listener(event) {
126
125
if ( q !== '' ) {
127
126
var url = 'https://github.com/ruanyf/es6tutorial/search?utf8=✓&q=' + encodeURIComponent ( q ) ;
128
127
window . open ( url , '_blank' ) ;
129
- win . focus ( ) ;
128
+ window . focus ( ) ;
130
129
}
131
130
return false ;
132
131
/*
@@ -244,6 +243,9 @@ function li_create_linkage(li_tag, header_level) {
244
243
}
245
244
246
245
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
+ /*
247
249
// 2022年8月25日
248
250
var deadline = new Date(2022, 7, 25);
249
251
if (deadline - (new Date()) < 0) return;
@@ -265,6 +267,7 @@ function create_banner(element) {
265
267
var banner = $('<a href="http://www.apeclass.com?did=12" style="color: #333333;" target="_blank"><div style="' + styleStr + '">' + text + '</div></a>')
266
268
.insertAfter(element);
267
269
setTimeout(function () {if (banner.css('display') === 'none') {show_loading();show_error();} }, 500);
270
+ */
268
271
}
269
272
270
273
function create_page_anchors ( ) {
@@ -358,7 +361,8 @@ function statistics() {
358
361
s . parentNode . insertBefore ( hm , s ) ;
359
362
}
360
363
361
- function router ( ) {
364
+ function router ( ) {
365
+ window . focus ( ) ;
362
366
var path = location . hash . replace ( / # ( [ ^ # ] * ) ( # .* ) ? / , './$1' ) ;
363
367
364
368
var hashArr = location . hash . split ( '#' ) ;
@@ -394,7 +398,7 @@ function router() {
394
398
395
399
$ . get ( path , function ( data ) {
396
400
$ ( ditto . error_id ) . hide ( ) ;
397
- $ ( ditto . content_id ) . html ( marked ( data ) + wwadsCode + disqusCode ) ;
401
+ $ ( ditto . content_id ) . html ( marked ( data ) + disqusCode ) ;
398
402
if ( $ ( ditto . content_id + " h1" ) . text ( ) === ditto . document_title ) {
399
403
document . title = ditto . document_title ;
400
404
} else {
0 commit comments