Skip to content

Commit 8626af1

Browse files
committed
Fix bug cached viewLesson page
1 parent e9760c9 commit 8626af1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content_script/lesson.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ function optimize_elect()
135135
var me = this;
136136

137137
// 有缓存的情况下直接加载缓存页面
138-
console.log(g_arrange_cache, lid);
138+
//console.log(g_arrange_cache, lid);
139139
if (g_arrange_cache.hasOwnProperty(lid)) {
140140
var cache = g_arrange_cache[lid];
141141
var now = new Date().getTime();
142-
console.log(cache.expire > now);
142+
//console.log(cache.expire > now);
143143
if (cache.expire > now) {
144144
// 更改 pushstate
145145
window.history.replaceState({lid: lid}, 'speltyGeneralCourse', url);
@@ -165,7 +165,7 @@ function optimize_elect()
165165
// 处理新页面
166166
var body = cache.html
167167
.replace(/\.\.\//g, '../../')
168-
.replace(/(\w+).aspx/g, '../../lesson/$1.aspx');
168+
.replace(/(viewLessonArrange).aspx/g, '../../lesson/$1.aspx');
169169
var bodyStart = body.indexOf('<form name="viewLesson"');
170170
var bodyEnd = body.lastIndexOf('</form>');
171171
body = body.substring(bodyStart, bodyEnd + '</form>'.length);

0 commit comments

Comments
 (0)