From 8626af12d6db286036bcca0d23888b1344719873 Mon Sep 17 00:00:00 2001 From: ComMouse Date: Wed, 14 Sep 2016 14:25:11 +0800 Subject: [PATCH] Fix bug cached viewLesson page --- content_script/lesson.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content_script/lesson.js b/content_script/lesson.js index 38d5fb6..b595c72 100755 --- a/content_script/lesson.js +++ b/content_script/lesson.js @@ -135,11 +135,11 @@ function optimize_elect() var me = this; // 有缓存的情况下直接加载缓存页面 - console.log(g_arrange_cache, lid); + //console.log(g_arrange_cache, lid); if (g_arrange_cache.hasOwnProperty(lid)) { var cache = g_arrange_cache[lid]; var now = new Date().getTime(); - console.log(cache.expire > now); + //console.log(cache.expire > now); if (cache.expire > now) { // 更改 pushstate window.history.replaceState({lid: lid}, 'speltyGeneralCourse', url); @@ -165,7 +165,7 @@ function optimize_elect() // 处理新页面 var body = cache.html .replace(/\.\.\//g, '../../') - .replace(/(\w+).aspx/g, '../../lesson/$1.aspx'); + .replace(/(viewLessonArrange).aspx/g, '../../lesson/$1.aspx'); var bodyStart = body.indexOf('
'); body = body.substring(bodyStart, bodyEnd + '
'.length);