// ==UserScript==
// @icon https://www.thfou.com/img/favicon.png
// @name 阿里巴巴高级自定义在线装修工具
// @namespace https://www.thfou.com/
// @version 1.0.9
// @description 为阿里巴巴店铺详情页、自定义页等页面开启自定义模块功能。
// @author 头号否
// @match *://design.1688.com/page/*
// @require https://libs.baidu.com/jquery/1.10.2/jquery.min.js
// @supportURL https://www.thfou.com/liuyan
// @compatible Chrome
// @compatible Firefox
// @compatible Edge
// @compatible Safari
// @compatible Opera
// @compatible UC
// @license GPL-3.0-only
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
var diy = document.createElement('ul'); // 新增元素
diy.id = 'thfou-design-1688';
diy.className = 'setting-tabs';
diy.style = 'margin:7px 0px 0px 1px;';
var diyget = document.querySelector('.diy-message'); // 获取元素
diy.innerHTML = '
高级自定义'; // 插入html代码
diyget.parentNode.insertBefore(diy, diyget); // 在这个元素前面增加上去
var diydesign = document.getElementById('diydesign');
diydesign.addEventListener('click', showMsg, false); //鼠标单击的时候调用showMes这个函数
function showMsg() {
// var addmain = document.createElement('ul'); // 新增元素
// addmain.id = 'thfou-design-1688';
// addmain.className = 'setting-tabs';
// addmain.style = '';
// var addmainget = document.querySelector('.segment-header'); // 获取元素
// addmain.innerHTML = ''; // 插入html代码
// addmainget.parentNode.insertBefore(addmain, addmainget); // 在这个元素前面增加上去
$('.region').append('');
$('.segment-header').attr("class","segment-header op-insertable op-deletable op-movable");
$('.segment-box').attr("class","segment-box segment-box-op-insertable segment-box-op-deletable segment-box-op-movable segment-box-enable segment-box-op-movable-down");
}
})();