Greasy Fork

阿里巴巴电脑端直接访问手机端

优化电脑端直接访问阿里无线端页面的布局,方便浏览。

目前为 2019-07-08 提交的版本。查看 最新版本

// ==UserScript==
// @icon             https://www.thfou.com/wp-content/uploads/2019/04/cropped-thfou1-32x32.png
// @name             阿里巴巴电脑端直接访问手机端
// @namespace        https://www.thfou.com/
// @version          1.0.0
// @description      优化电脑端直接访问阿里无线端页面的布局,方便浏览。
// @author           头号否
// @match            *://m.1688.com/offer_search/*
// @require          https://libs.baidu.com/jquery/1.10.2/jquery.min.js
// @supportURL       https://www.thfou.com/message#respond
// @contributionURL  https://www.thfou.com/
// @grant            none
// ==/UserScript==

(function() {
    'use strict';
//修改手机端布局
 var styleEle = document.createElement("style");
 styleEle.type = "text/css";
 styleEle.innerHTML = "#header{width:500px!important;}.thfoumain{font-size: 50px!important; width: 500px!important; margin: 0 auto;background:#ebebeb;}";
 var x = document.getElementsByTagName("head")[0];
 x.insertBefore(styleEle, x.lastChild); // firstChild表示最先加载lastChild表示最后加载
document.getElementsByTagName('html')[0].className = 'thfoumain';
})();