mobile
This commit is contained in:
parent
52f77521c8
commit
816b6f3ea6
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name tieba page
|
// @name tieba page
|
||||||
// @namespace http://tampermonkey.net/
|
// @namespace http://tampermonkey.net/
|
||||||
// @version 0.50
|
// @version 0.51
|
||||||
// @author fthvgb1
|
// @author fthvgb1
|
||||||
// @match https://tieba.baidu.com/*
|
// @match https://tieba.baidu.com/*
|
||||||
// @grant unsafeWindow
|
// @grant unsafeWindow
|
||||||
|
@ -158,12 +158,25 @@ function f(value) {
|
||||||
} else if (fl === 2) {
|
} else if (fl === 2) {
|
||||||
l.textContent = '沙发';
|
l.textContent = '沙发';
|
||||||
} else if (fl === 3) {
|
} else if (fl === 3) {
|
||||||
l.textContent = '地板';
|
l.textContent = '板凳';
|
||||||
}
|
}
|
||||||
value.querySelector('.list_item_time').parentNode.appendChild(l);
|
value.querySelector('.list_item_time').parentNode.appendChild(l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check() {
|
||||||
|
let userAgentInfo = navigator.userAgent;
|
||||||
|
let Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
|
||||||
|
let flag = 0;
|
||||||
|
for (let v = 0; v < Agents.length; v++) {
|
||||||
|
if (userAgentInfo.indexOf(Agents[v]) > -1) {
|
||||||
|
flag = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
function list() {
|
function list() {
|
||||||
[
|
[
|
||||||
'.frs_daoliu_for_app', '.tl_shadow_for_app_modle',
|
'.frs_daoliu_for_app', '.tl_shadow_for_app_modle',
|
||||||
|
@ -220,13 +233,16 @@ function detail() {
|
||||||
}
|
}
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
let url = location.href;
|
'use strict';
|
||||||
|
if (check()) {
|
||||||
|
let url = location.href;
|
||||||
|
|
||||||
if (/\/p\/\d+/.test(url)) {
|
if (/\/p\/\d+/.test(url)) {
|
||||||
detail();
|
detail();
|
||||||
}
|
}
|
||||||
if (/f\?kw=.+/.test(url)) {
|
if (/f\?kw=.+/.test(url)) {
|
||||||
list();
|
list();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user