// ==UserScript==
// @icon https://www.thfou.com/wp-content/uploads/2019/04/cropped-thfou1-32x32.png
// @name 阿里巴巴高级自定义在线装修工具
// @namespace https://www.thfou.com/
// @version 1.0.2
// @description 为阿里巴巴店铺详情页、自定义页等页面开启自定义模块功能。
// @author 头号否
// @match *://design.1688.com/page/*
// @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
// @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('头号代码提示:使用前记得先备份,以防丢失!更多工具请访问(daima.thfou.com)
');
$('.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");
}
})();