您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
将电脑版页面改为手机版,让新闻内容居中,隐藏推荐新闻
当前为
// ==UserScript== // @name 快资讯美化 // @namespace http://tampermonkey.net/ // @version 0.3.1 // @description 将电脑版页面改为手机版,让新闻内容居中,隐藏推荐新闻 // @author You // @match *://www.360kuai.com/* // @grant none // ==/UserScript== (function() { 'use strict' var u0 = window.location.href; var u1,u2,u3,u4; if(u0.indexOf("mob") == -1) //非手机版 { if(u0.indexOf("pc/detail") > -1) //电脑版 { u1 = u0.substr(0,24) u2 = u0.substr(34,u0.length-34) console.log("u1="+u1) console.log("u2="+u2) u3 = u1+"mob/transcoding?"+u2; console.log("u3="+u3) window.location.href = u3 } else { u1 = u0.substr(0,24) u2 = u0.substr(24,17) console.log("u1="+u1) console.log("u2="+u2) if(u2=="") return; else if(u2.indexOf("pc/home") == -1) //非电脑版首页 { if(u2.indexOf("pc") > -1)//pc { u2 = u0.substr(27,17) u3 = u0.substr(45,u0.length-45) console.log("u3="+u3) u4 = u1+"mob/transcoding?url="+u2+"&"+u3; console.log("u4="+u4) window.location.href = u4 } else //无前缀 { u3 = u0.substr(42,u0.length-42) console.log("u3="+u3) u4 = u1+"mob/transcoding?url="+u2+"&"+u3; console.log("u4="+u4) window.location.href = u4 } } } } var rel_news = document.getElementById("rel_news") if(rel_news != null) rel_news.setAttribute("style","display:none") var aside = document.getElementById("aside") if(aside != null) aside.setAttribute("style","display:none") })(); $("#hd_usernav").on('mouseenter', function () { $(".welcome").on('mouseenter', function () { $("ul").on('mouseenter', function () { $(".my-wallet").attr("target","_self") }); }); });