From 61c286f47bd8de1f917ae3d1a1ba1595ae0dacea Mon Sep 17 00:00:00 2001 From: xing Date: Wed, 4 Mar 2020 16:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=83=A8=E5=88=86url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tieba page.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tieba page.js b/tieba page.js index c289404..cf16f8e 100644 --- a/tieba page.js +++ b/tieba page.js @@ -253,6 +253,11 @@ function createTime() { let url = location.href.replace('&mo_device=1', ''); url = decodeURIComponent(url); + if (url.indexOf('/mo/') > -1) { + let word = /word=(.*?)&/.exec(url)[1]; + url = url.replace('mo/q/m', 'f').replace(/word=(.*?)&/, 'kw=' + word + '&'); + + } GM_xmlhttpRequest({ method: 'GET', url: url, @@ -261,6 +266,7 @@ }, //responseType: obj.responseType, onload: function (res) { + let r = (new DOMParser()).parseFromString(res.responseText, 'text/html'); let w = r.getElementById('pagelet_html_frs-list/pagelet/thread_list').innerHTML; let ul = w.replace('', '');