-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet History Msg Links for WeChat.js
64 lines (56 loc) · 2.96 KB
/
Get History Msg Links for WeChat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// ==UserScript==
// @name 获取微信公众号历史消息链接
// @version 0.5
// @description Get History Msg Links for WeChat
// @namespace http://www.cnblogs.com/Chary/
// @author CharyGao
// @match http://mp.weixin.qq.com/s?*
// @match https://mp.weixin.qq.com/s?*
// @match https://mp.weixin.qq.com/s?*
// @match http://mp.weixin.qq.com/s/*
// @match file:///*
// @grant GM_addStyle
// @run-at document-start
// @require https://cdn.bootcss.com/jquery/3.3.1/jquery.js
// @icon https://res.wx.qq.com/zh_CN/htmledition/v2/images/favicon31e225.ico
// ==/UserScript==
GM_addStyle('span.weui_media_hd{width:100px!important;float:left!important;} ' +
'#down_url_links{white-space:nowrap!important;background-color:orange!important;} ' +
//'#img-content{position:fixed!important;z-index:100!important;top:20px!important;left:2%!important;height:95%!important;width:96%!important;overflow:scroll!important;}' +
//'.img_loading{margin-left: auto;margin-right: auto;display: block;} .rich_media_area_primary_inner{max-width: 90%!important;}'+
'#js_pc_qr_code{visibility:hidden!important;}' +
'#page-content{background-color:rgba(0,0,0,0)!important;}' +
'#js_profile_qrcode_img{height:100px!important;width:100px!important;}'// +'img{width:auto!important;height:auto!important;display: block!important;margin-left: auto!important;margin-right: auto!important;}'
);//直接下载所有图片
(function ($) {
'use strict';
$(function () {
$('img').each(function(){
var dataSrc = $(this).attr('data-src');
var width = $(this).attr('data-w');
if (dataSrc){
$(this).attr('_width', width+'px');
$(this).removeAttr('src');
$(this).attr('style', "vertical-align: baseline; font-weight: inherit; font-family: SimSun, Arial; font-style: inherit; margin-top: 28px; margin-right: auto; margin-left: auto; border-width: 0px; border-style: initial; border-color: initial; display: block; max-width: 640px; width: 600px !important; height: auto !important; visibility: visible !important;");
$(this).data('src',dataSrc);
$(this).attr('data-fail',0);
$(this).data('class','');
}
});
if ($('#down_url')) {
$('#down_url').remove();
};
$(document.body).prepend('<div id="down_url" ></div>');
$('#down_url').append('links count: , ' + $('h4.weui_media_title').length + '<br>');
$('#js_view_source').href = window.msg_source_url;
$('#js_view_source').target = '_blank';
$('h4.weui_media_title').each(function (i) {
var link_href = $(this).attr('hrefs');
if (link_href) {
var down_link = '<div id="down_url_links">' + i + ' , ' + link_href + ' , ' + $(this).text() + '</div>';
$('#down_url').append(down_link);
}
}
);
});
})(window.jQuery.noConflict(true));