username@email.com
2021-09-02 9da546cd8de37882147f19f6f090544476bfe5ae
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
$(function () {
    var myPopupPanel = new Redstorm.Widget.PopupPanel();
    $('a.16sucai').bind('click', function () {
        myPopupPanel.createPanelShare({
            width: 340,
            oEvent: EventUtil.getEvent()
        });
        return false;
    });
    $('a.error-report').bind('click', function () {
        myPopupPanel.createPanelErrorReport({
            width: 300,
            oEvent: EventUtil.getEvent()
        });
        return false;
    });
    $('a.panel-comment').bind('click', function () {
        myPopupPanel.createPanelComment({
            width: 300,
            oEvent: EventUtil.getEvent()
        });
        return false;
    });
    /*
    $('div.docoda').codaSlider({
    dynamicArrowLeftText: " ",
    dynamicArrowRightText: " ",
    slideEaseDuration: 500
    })
    */
    var obj = $('div.tag-topic');
    obj.find('li').hover(function () {
        $(this).find('.title').animate({
            height: 'toggle',
            opacity: 0.7
        }, 200);
    }, function () {
        obj.find('.title').fadeOut();
    });
    $('#gotop a').click(function () {
        $("#wrap-header").scrollTo(300);
        return false;
    });
    $('div.pagerebuild ul').children('b').remove().end().contents().filter('[nodeValue="总数:"]').remove();
});
var isPanel = false;
var Redstorm;
if (!Redstorm) Redstorm = {};
if (!Redstorm.Widget) Redstorm.Widget = {};
Redstorm.Widget.PopupPanel = function (opts) {
    this.init(opts);
};
Redstorm.Widget.PopupPanel.prototype.init = function (opts) {
    this.settings = {
        top: 0,
        left: 0,
        offsetY: 10,
        offsetX: -25,
        width: 300,
        zIndex: 888,
        oEvent: null
    };
    Redstorm.Widget.setOptions(this.settings, opts);
};
Redstorm.Widget.PopupPanel.prototype.createPanel = function (opts) {
    Redstorm.Widget.setOptions(this.settings, opts);
    var html = '';
    html += '<div id="panel-popup" class="dn">';
    html += '<div class="overlay"></div><div class="close"></div>';
    html += '<div class="outerbox"><div class="innerbox clearfix"></div></div>';
    html += '<div class="footbox"><div></div></div>';
    html += '</div>';
    $('body').find('#panel-popup').remove().end().append(html);
    $('#panel-popup').fadeIn().css({
        'top': this.settings.oEvent.pageY ? this.settings.oEvent.pageY + this.settings.offsetY : this.settings.top,
        'left': this.settings.oEvent.pageX ? this.settings.oEvent.pageX + this.settings.offsetX : this.settings.left,
        'width': this.settings.width + 'px',
        'z-index': this.settings.zIndex
    }).bind('mouseover', function () {
        isPanel = true;
    }).bind('mouseout', function () {
        isPanel = false;
    });
    $('#panel-popup .close').bind('click', function () {
        Redstorm.Widget.PopupPanel.remove();
    });
    $('body').bind('click', function () {
        if (!isPanel) Redstorm.Widget.PopupPanel.remove();
    });
};
Redstorm.Widget.PopupPanel.remove = function () {
    $('#panel-popup').fadeOut();
};
Redstorm.Widget.PopupPanel.prototype.createPanelShare = function (opts) {
    this.createPanel(opts);
    var oTarget = this.settings.oEvent.target;
    var shareVal = {
        t: oTarget.title ? encodeURIComponent(oTarget.title) : encodeURIComponent(document.title),
        c: oTarget.content ? encodeURIComponent(oTarget.content) : '',
        u: oTarget.href ? encodeURIComponent(oTarget.href) : encodeURIComponent(document.location.href),
        p: oTarget.pic ? encodeURIComponent(oTarget.pic) : '',
        s: encodeURIComponent(document.location.host)
    }
    var shareObj = {
        tsina: {
            name: '新浪微博',
            url: 'http://v.t.sina.com.cn/share/share.php',
            param: 'title=[t]&url=[u]&pic=[p]&source=[s]'
        },
        kaixin: {
            name: '开心网',
            url: 'http://www.kaixin001.com/repaste/share.php',
            param: 'rtitle=[t]&rurl=[u]'
        },
        renren: {
            name: '人人网',
            url: 'http://share.renren.com/share/buttonshare.do',
            param: 'title=[t]&link=[u]'
        },
        qzone: {
            name: 'QQ空间',
            url: 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey',
            param: 'title=[t]&url=[u]'
        },
        googlebkmk: {
            name: '谷歌书签',
            url: 'http://www.google.com/bookmarks/mark',
            param: 'op=add&bkmk=[u]&title=[t]'
        },
        cangbaidu: {
            name: '百度收藏',
            url: 'http://cang.baidu.com/do/add',
            param: 'it=[t]&iu=[u]&fr=ien#nw=1'
        },
        jianghu: {
            name: '淘江湖',
            url: 'http://share.jianghu.taobao.com/share/addShare.htm',
            param: 'url=[u]'
        },
        douban: {
            name: '豆瓣',
            url: 'http://www.douban.com/recommend/',
            param: 'url=[u]&title=[t]&v=1'
        }
    }
    var html = '';
    var url = '';
    for (var key in shareObj) {
        if (shareObj[key] == undefined) continue;
        url = shareObj[key].url + '?' + shareObj[key].param;
        url = url.replace('[t]', shareVal.t);
        url = url.replace('[c]', shareVal.c);
        url = url.replace('[u]', shareVal.u);
        url = url.replace('[p]', shareVal.p);
        url = url.replace('[s]', shareVal.s);
        html += '<li>';
        html += '<a href="' + url + '" target="_blank" class="' + key + '">' + shareObj[key].name + '</a>';
        html += '</li">';
    }
    html = html != '' ? '<ul class="sharebox">' + html + '</ul>' : '';
    $('#panel-popup .innerbox').html(html);
};
Redstorm.Widget.PopupPanel.prototype.createPanelErrorReport = function (opts) {
    this.createPanel(opts);
    var oTarget = this.settings.oEvent.target;
    var reportVal = {
        title: oTarget.title ? oTarget.title : '',
        url: oTarget.href ? oTarget.href : '',
        cid: oTarget.name ? oTarget.name : 0
    }
    $('#panel-popup .innerbox').html(sHtmlReport);
    $('#reportform').bind('submit', this.checkFormErrorReport);
    $('#error_title').val(reportVal.title);
    $('#error_link').val(reportVal.url);
    $('#error_contentid').val(reportVal.cid);
};
Redstorm.Widget.PopupPanel.prototype.createPanelComment = function (opts) {
    this.createPanel(opts);
    var oTarget = this.settings.oEvent.target;
    var commentVal = {
        keyid: oTarget.name ? oTarget.name.replace(/(.*)\|(.*)/, '$1') : '',
        verify: oTarget.name ? oTarget.name.replace(/(.*)\|(.*)/, '$2') : ''
    }
    $('#panel-popup .innerbox').html(sHtmlComment);
    $('#commentform').bind('submit', this.checkFormComment);
    $('#commentform input[name="keyid"]').val(commentVal.keyid);
    $('#commentform input[name="verify"]').val(commentVal.verify);
};
Redstorm.Widget.PopupPanel.prototype.checkFormErrorReport = function () {
    if ($("#reportform input[@type=radio][@checked]").val() === undefined) {
        alert('类别不能为空!');
        return false;
    }
    if ($('#reportform #error_title').val() == '') {
        $('#reportform #error_title').focus();
        alert('标题不能为空!');
        return false;
    }
    if ($('#reportform #error_link').val() == '') {
        $('#reportform #error_link').focus();
        alert('地址不能为空!');
        return false;
    }
    if ($('#reportform #checkcode').val() == '') {
        $('#reportform #checkcode').focus();
        alert('验证码不能为空!');
        return false;
    }
};
Redstorm.Widget.PopupPanel.prototype.checkFormComment = function () {
    if ($('#commentform #comment').val() == '') {
        $('#commentform #comment').focus();
        alert('评论内容不能为空!');
        return false;
    }
    if ($('#commentform #checkcode').val() == '') {
        $('#commentform #checkcode').focus();
        alert('验证码不能为空!');
        return false;
    }
};
Redstorm.Widget.setOptions = function (obj, optionsObj, ignoreUndefinedProps) {
    if (!optionsObj) return;
    for (var optionName in optionsObj) {
        if (ignoreUndefinedProps && optionsObj[optionName] == undefined) continue;
        obj[optionName] = optionsObj[optionName];
    }
};
var sUserAgent = navigator.userAgent;
var fAppVersion = parseFloat(navigator.appVersion);
function compareVersions(sVersion1, sVersion2) {
    var aVersion1 = sVersion1.split(".");
    var aVersion2 = sVersion2.split(".");
    if (aVersion1.length > aVersion2.length) {
        for (var i = 0; i < aVersion1.length - aVersion2.length; i++) {
            aVersion2.push("0");
        }
    } else if (aVersion1.length < aVersion2.length) {
        for (var i = 0; i < aVersion2.length - aVersion1.length; i++) {
            aVersion1.push("0");
        }
    }
    for (var i = 0; i < aVersion1.length; i++) {
        if (aVersion1[i] < aVersion2[i]) {
            return -1;
        } else if (aVersion1[i] > aVersion2[i]) {
            return 1;
        }
    }
    return 0;
}
var isOpera = sUserAgent.indexOf("Opera") > -1;
var isMinOpera4 = isMinOpera5 = isMinOpera6 = isMinOpera7 = isMinOpera7_5 = false;
if (isOpera) {
    var fOperaVersion;
    if (navigator.appName == "Opera") {
        fOperaVersion = fAppVersion;
    } else {
        var reOperaVersion = new RegExp("Opera (//d+//.//d+)");
        reOperaVersion.test(sUserAgent);
        fOperaVersion = parseFloat(RegExp["$1"]);
    }
    isMinOpera4 = fOperaVersion >= 4;
    isMinOpera5 = fOperaVersion >= 5;
    isMinOpera6 = fOperaVersion >= 6;
    isMinOpera7 = fOperaVersion >= 7;
    isMinOpera7_5 = fOperaVersion >= 7.5;
}
var isKHTML = sUserAgent.indexOf("KHTML") > -1 || sUserAgent.indexOf("Konqueror") > -1 || sUserAgent.indexOf("AppleWebKit") > -1;
var isMinSafari1 = isMinSafari1_2 = false;
var isMinKonq2_2 = isMinKonq3 = isMinKonq3_1 = isMinKonq3_2 = false;
if (isKHTML) {
    isSafari = sUserAgent.indexOf("AppleWebKit") > -1;
    isKonq = sUserAgent.indexOf("Konqueror") > -1;
    if (isSafari) {
        var reAppleWebKit = new RegExp("AppleWebKit///(//d+(?://.//d*)?)");
        reAppleWebKit.test(sUserAgent);
        var fAppleWebKitVersion = parseFloat(RegExp["$1"]);
        isMinSafari1 = fAppleWebKitVersion >= 85;
        isMinSafari1_2 = fAppleWebKitVersion >= 124;
    } else if (isKonq) {
        var reKonq = new RegExp("Konqueror///(//d+(?://.//d+(?://.//d)?)?)");
        reKonq.test(sUserAgent);
        isMinKonq2_2 = compareVersions(RegExp["$1"], "2.2") >= 0;
        isMinKonq3 = compareVersions(RegExp["$1"], "3.0") >= 0;
        isMinKonq3_1 = compareVersions(RegExp["$1"], "3.1") >= 0;
        isMinKonq3_2 = compareVersions(RegExp["$1"], "3.2") >= 0;
    }
}
var isIE = sUserAgent.indexOf("compatible") > -1 && sUserAgent.indexOf("MSIE") > -1 && !isOpera;
var isMinIE4 = isMinIE5 = isMinIE5_5 = isMinIE6 = false;
if (isIE) {
    var reIE = new RegExp("MSIE (//d+//.//d+);");
    reIE.test(sUserAgent);
    var fIEVersion = parseFloat(RegExp["$1"]);
    isMinIE4 = fIEVersion >= 4;
    isMinIE5 = fIEVersion >= 5;
    isMinIE5_5 = fIEVersion >= 5.5;
    isMinIE6 = fIEVersion >= 6.0;
}
var isMoz = sUserAgent.indexOf("Gecko") > -1 && !isKHTML;
var isMinMoz1 = sMinMoz1_4 = isMinMoz1_5 = false;
if (isMoz) {
    var reMoz = new RegExp("rv:(//d+//.//d+(?://.//d+)?)");
    reMoz.test(sUserAgent);
    isMinMoz1 = compareVersions(RegExp["$1"], "1.0") >= 0;
    isMinMoz1_4 = compareVersions(RegExp["$1"], "1.4") >= 0;
    isMinMoz1_5 = compareVersions(RegExp["$1"], "1.5") >= 0;
}
var isNS4 = !isIE && !isOpera && !isMoz && !isKHTML && (sUserAgent.indexOf("Mozilla") == 0) && (navigator.appName == "Netscape") && (fAppVersion >= 4.0 && fAppVersion < 5.0);
var isMinNS4 = isMinNS4_5 = isMinNS4_7 = isMinNS4_8 = false;
if (isNS4) {
    isMinNS4 = true;
    isMinNS4_5 = fAppVersion >= 4.5;
    isMinNS4_7 = fAppVersion >= 4.7;
    isMinNS4_8 = fAppVersion >= 4.8;
}
var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows");
var isMac = (navigator.platform == "Mac68K") || (navigator.platform == "MacPPC") || (navigator.platform == "Macintosh");
var isUnix = (navigator.platform == "X11") && !isWin && !isMac;
var isWin95 = isWin98 = isWinNT4 = isWin2K = isWinME = isWinXP = false;
var isMac68K = isMacPPC = false;
var isSunOS = isMinSunOS4 = isMinSunOS5 = isMinSunOS5_5 = false;
if (isWin) {
    isWin95 = sUserAgent.indexOf("Win95") > -1 || sUserAgent.indexOf("Windows 95") > -1;
    isWin98 = sUserAgent.indexOf("Win98") > -1 || sUserAgent.indexOf("Windows 98") > -1;
    isWinME = sUserAgent.indexOf("Win 9x 4.90") > -1 || sUserAgent.indexOf("Windows ME") > -1;
    isWin2K = sUserAgent.indexOf("Windows NT 5.0") > -1 || sUserAgent.indexOf("Windows 2000") > -1;
    isWinXP = sUserAgent.indexOf("Windows NT 5.1") > -1 || sUserAgent.indexOf("Windows XP") > -1;
    isWinNT4 = sUserAgent.indexOf("WinNT") > -1 || sUserAgent.indexOf("Windows NT") > -1 || sUserAgent.indexOf("WinNT4.0") > -1 || sUserAgent.indexOf("Windows NT 4.0") > -1 && (!isWinME && !isWin2K && !isWinXP);
}
if (isMac) {
    isMac68K = sUserAgent.indexOf("Mac_68000") > -1 || sUserAgent.indexOf("68K") > -1;
    isMacPPC = sUserAgent.indexOf("Mac_PowerPC") > -1 || sUserAgent.indexOf("PPC") > -1;
}
if (isUnix) {
    isSunOS = sUserAgent.indexOf("SunOS") > -1;
    if (isSunOS) {
        var reSunOS = new RegExp("SunOS (//d+//.//d+(?://.//d+)?)");
        reSunOS.test(sUserAgent);
        isMinSunOS4 = compareVersions(RegExp["$1"], "4.0") >= 0;
        isMinSunOS5 = compareVersions(RegExp["$1"], "5.0") >= 0;
        isMinSunOS5_5 = compareVersions(RegExp["$1"], "5.5") >= 0;
    }
}
var EventUtil = new Object;
EventUtil.addEventHandler = function (oTarget, sEventType, fnHandler) {
    if (oTarget.addEventListener) {
        oTarget.addEventListener(sEventType, fnHandler, false);
    } else if (oTarget.attachEvent) {
        oTarget.attachEvent("on" + sEventType, fnHandler);
    } else {
        oTarget["on" + sEventType] = fnHandler;
    }
};
EventUtil.removeEventHandler = function (oTarget, sEventType, fnHandler) {
    if (oTarget.removeEventListener) {
        oTarget.removeEventListener(sEventType, fnHandler, false);
    } else if (oTarget.detachEvent) {
        oTarget.detachEvent("on" + sEventType, fnHandler);
    } else {
        oTarget["on" + sEventType] = null;
    }
};
EventUtil.formatEvent = function (oEvent) {
    if (isIE && isWin) {
        oEvent.charCode = (oEvent.type == "keypress") ? oEvent.keyCode : 0;
        oEvent.eventPhase = 2;
        oEvent.isChar = (oEvent.charCode > 0);
        oEvent.pageX = oEvent.clientX + document.documentElement.scrollLeft;
        oEvent.pageY = oEvent.clientY + document.documentElement.scrollTop;
        oEvent.preventDefault = function () {
            this.returnValue = false;
        };
        if (oEvent.type == "mouseout") {
            oEvent.relatedTarget = oEvent.toElement;
        } else if (oEvent.type == "mouseover") {
            oEvent.relatedTarget = oEvent.fromElement;
        }
        oEvent.stopPropagation = function () {
            this.cancelBubble = true;
        };
        oEvent.target = oEvent.srcElement;
        oEvent.time = (new Date).getTime();
    }
    return oEvent;
};
EventUtil.getEvent = function () {
    if (window.event) {
        return this.formatEvent(window.event);
    } else {
        return EventUtil.getEvent.caller.arguments[0];
    }
};