-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoice.bak.php
More file actions
executable file
·85 lines (77 loc) · 3.92 KB
/
voice.bak.php
File metadata and controls
executable file
·85 lines (77 loc) · 3.92 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="./jquery-2.2.0.js"></script>
</head>
<body>
<input type="button" value = "点………………………………" id="btnClick2" />
<div id="contentV"></div>
<iframe style="display: block;" id="IContent" name="IContent" width="100%" height="900" src="<?php echo $_POST["url"] ?>"></iframe>
<script type="text/javascript">
$(function() {
$("#btnClick2").click(function(){
//var htmlContents = $(document.getElementById('IContent').contentWindow.document.body).find("div.content-body").children().length;
var htmlContents = $("#IContent").contents().find('.content-body').html();
alert(htmlContents);
$("#contentV").html(htmlContents);
});
});
function handleData() {
var handeFlag = $("#handeFlag").val();
if (handeFlag == 1) {
var kongge = new RegExp(" ", "g");
var titleContent = $(".custom-title-noline").text().replace(kongge, "");
var title = titleContent.substring(0, titleContent.indexOf("2016-"));
var rerrr = new RegExp("[0-9]", "g");
var author = titleContent.replace(title, '').replace("罗辑思维", '').replace(rerrr, '').replace("--", "");
var mp3Valie = $(".custom-audio").attr('data-src');
var firstImage = $(".js-view-image-item").attr("data-src").replace("https", "http");
var temp = $(".js-view-image-item");
$(temp[0]).remove();
var contentHtml = $(".custom-richtext.js-lazy-container.js-view-image-list");
var tempContentHtml = "";
var contentHtml = $(".content-body.js-page-content");
var templent = contentHtml.children().length;
for (i = 0; i < templent; i++) {
if (i > 2 && i < templent - 6) {
tempContentHtml += contentHtml.children().eq(i).html();
}
}
var reval = "";
reval += "[语音]2016.02.17 开始《" + $.trim(title) + "》";
reval += "[align=left][size=5][color=#2e8b57]罗胖微信语音[/color][/size]";
reval += "[audio]";
reval += mp3Valie + "!64k.mp3";
reval += "[/audio][/align]";
reval += "[align=center][color=#ff0000][b]开始[/b][/color][/align]<br>语音文字<br>今天您往下拖<br>";
reval += "[img=201,0]";
reval += firstImage;
reval += "[/img]<br/>今日微信推送<br/>[align=center][font=微软雅黑][b]" + $.trim(title) + "[/b][/font][/align][align=center]" + author + "[/align][/align]";
$("#oldContent").html("");
$("#contentDiv").html(reval).append(tempContentHtml);
$("#handeFlag").val(2);
}
if (typeof $(".search-bar") != "undefined") {
$(".search-bar").remove();
}
if (typeof $(".js-right-icon.hide") != "undefined") {
$(".js-right-icon.hide").remove();
}
if ($("#handeFlag").val() == 2) {
$("#oldContent").remove();
var newHtml = $("#contentDiv").html();
var reee = new RegExp("https", "g");
newHtml = newHtml.replace(reee, 'http');
reee = new RegExp("<img", "g");
newHtml = newHtml.replace(reee, '<br/><img ');
reee = new RegExp('!730x0.jpg">', "g");
newHtml = newHtml.replace(reee, '"/><br/><br/>');
$("#contentDiv").html(newHtml);
$("#handeFlag").val(3)
}
}
</script>
</body>
</html>