// ==UserScript==
// @name 微信编辑器爆破
// @namespace https://greasyfork.org/users/734068
// @home-url https://gitee.com/yeminch/yim-donate
// @version 1.14
// @description 无视微信编辑器VIP限制,可以使用VIP排版(135,96,365,wxeditor,主编,壹伴)
// @author Yim @ yeminch@qq.com
// @match *://*.135editor.com/*
// @match *://www.135editor.com/js/ueditor/dialogs/135editor/imgstyle.html*
// @match *://bj.96weixin.com/*
// @match *://www.wxeditor.com/*
// @match *://www.zhubian.com/*
// @match *://yibanbianji.com/*
// @match *://www.365editor.com/*
// @match https://mp.weixin.qq.com/cgi-bin/appmsg*
// @match *://*.yibanbianji.com/*
// @match *://www.xmyeditor.com/*
// @run-at document-end
// @grant unsafeWindow
// @require https://cdn.jsdelivr.net/npm/jquery@1.11.3/dist/jquery.min.js
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
let setting={
item:null,
type:1,
};
var lists=[];
function init(){
var host = window.location.host;
if(host.search(/www.135editor.com/)>=0) init135();
if(host.search(/bj.96weixin.com/)>=0) init96();
if(host.search(/www.wxeditor.com/)>=0) initYD();
if(host.search(/www.zhubian.com/)>=0) initZB();
if(host.search(/yibanbianji.com/)>=0) initYB();
if(host.search(/weixin.qq.com/)>=0) initWXYB();
if(host.search(/www.xmyeditor.com/)>=0) initXMY2();
if(host.search(/www.365editor.com/)>=0) init365();
}
function addStyle(cssText) {
let a = document.createElement('style');
a.textContent = cssText;
let doc = document.head || document.documentElement;
doc.appendChild(a);
}
function init135(){
$('
/,'');
if(h) ue.setContent(h, true);
});
$("body").on('mousemove',function(event){
var mouseX = event.pageX,mouseY = event.pageY;
var ele = $(event.target).parents('li.LB-sl-li');
if(ele.length>0){
var y1 = ele.offset().top;
var y2 = y1 + ele.height();
var x1 = ele.offset().left;
var x2 = x1 + ele.width();
if( mouseX < x1 || mouseX > x2 || mouseY < y1 || mouseY > y2){
$('.ym_wx_plus_btn').hide();
setting.item=null;
}else{
$('.ym_wx_plus_btn').css('left',(x2-90)+'px').css('top',(y1)+'px').show();
setting.item=ele;
}
}else{
if(!$(event.target).hasClass('ym_wx_plus_btn'))$('.ym_wx_plus_btn').hide();
}
});
}
function init365(){
$('
强势插入
').appendTo('body').on('click',function(){
if(!setting.item) return false;
var h;
if(setting.type==1) h=setting.item.find('.KolEditor').html();
else if(setting.type==2){
h= setting.item.children().eq(2).prop('outerHTML');
$('.phone-perview-inner .close-btn').trigger('click');
}
if(h) UE.instants["ueditorInstant0"].setContent(h,true);
$('.ym_wx_plus_btn').hide();
});
$("body").on('mousemove',function(event){
var mouseX = event.pageX,mouseY = event.pageY;
var ele,x1,x2,y1,y2;
ele = $(event.target).parents('.content-material .material-list');
if(ele.length>0){
setting.type=1;
y1 = ele.offset().top;
y2 = y1 + ele.height();
x1 = ele.offset().left;
x2 = x1 + ele.width();
if( mouseX < x1 || mouseX > x2 || mouseY < y1 || mouseY > y2){
$('.ym_wx_plus_btn').hide();
setting.item=null;
}else{
$('.ym_wx_plus_btn').css('left',(x2-90)+'px').css('top',(y1)+'px').show();
setting.item=ele;
}
}else{
ele = $(event.target).parents('.phone-perview-inner .preview-body');
if(ele.length>0){
y1 = ele.offset().top;
y2 = y1 + ele.height();
x1 = ele.offset().left;
x2 = x1 + ele.width();
setting.type=2;
setting.item=ele;
$('.ym_wx_plus_btn').css('left',(x2-150)+'px').css('top',(y1+5)+'px').show();
}else{
if(!$(event.target).hasClass('ym_wx_plus_btn'))$('.ym_wx_plus_btn').hide();
}
}
});
}
addStyle(`
.ym_wx_plus_btn{position:absolute;display:none;left:0;top:5px;cursor:pointer;width:90px;height:30px;line-height:30px;background:#f00;color:#fff;text-align:center;z-index:99999999;}
`);
init();
})();