This commit is contained in:
xing 2020-02-15 23:56:55 +08:00
parent 52f77521c8
commit 816b6f3ea6

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name tieba page
// @namespace http://tampermonkey.net/
// @version 0.50
// @version 0.51
// @author fthvgb1
// @match https://tieba.baidu.com/*
// @grant unsafeWindow
@ -158,12 +158,25 @@ function f(value) {
} else if (fl === 2) {
l.textContent = '沙发';
} else if (fl === 3) {
l.textContent = '板';
l.textContent = '';
}
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() {
[
'.frs_daoliu_for_app', '.tl_shadow_for_app_modle',
@ -220,6 +233,8 @@ function detail() {
}
(function () {
'use strict';
if (check()) {
let url = location.href;
if (/\/p\/\d+/.test(url)) {
@ -228,6 +243,7 @@ function detail() {
if (/f\?kw=.+/.test(url)) {
list();
}
}
})();